I'm new to awk as well, could someone please explain the initial for loop to me? Thanks!
No one has replied
solute it by awk.
Initialize two-D array vector, NF(column), NR(row)
Print the array, there is a trap here " each field is separated by the ' ' character"
My guaranteed low-memory solution throws MLE too:
This is rather slow, but pretty human readable!
same problems here.
on the ubuntu 14.04 should use substr(arr[i], 0, length(arr[i]))} not length-1,this why??
Can it run in the limited time? Maybe not.
I have made same mistake with you. The number of columns may be not two.
One of the test case is only one column.
I think this question may want us to manipulate arrays of two dimension.
@archieve You can't assume there're always 2 columns. There may be less or more.
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.