Using grep only solution. Accepted.

  • 0

    I used only grep to get that accepted solution:
    grep -n ".*" file.txt | grep -Po "^10:\K.*”

    Simple head/tail solution failed on a file with a few (<10) lines.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.