3 ms·
I wouldn't get too ahead of yourself since this looks like C++ but won't work unless you make a special array class that returns pointers to the start of lines
by CyberDildonics 2y ago
I wouldn't get too ahead of yourself since this looks like C++ but won't work unless you make a special array class that returns pointers to the start of lines from the operator[] function. Even then you would need to switch the x and the y so that the y comes first.
You might say it's pseudo code but one of the original comments was talking about the low numbers of people who could actually get something to compile and solve a problem.
- em-bee 2y agoit's neither c++ nor is it pseudo code. but this language has been designed to closely follow C syntax, so the confusion is not surprising. in fact originally the language did have C in its name. i am going to leave the actual answer at what language this is open to allow more people to keep guessing ;-) you are right about x and y. i was really tired :o but it runs (at least as long as there is no overflow). here is a sample output: > findgrid(data, y, x, seek); // there, fixed the x/y problem ;-) 160:0 165:0 65:0 174:0 23:0 253:0 229:0 130:1 (1) Result: 1 oh, and since we are talking about interview experiences. at one job during the interview i was allowed to provide coding solutions in this language, even though the job was about python.