Pergunta de entrevista da empresa Bluewrist

Standard questions about past work. Asked to solve various programming problems such as UML design question on white board, which search methods are fastest, etc. A couple of C++ programming problems with pencil and paper, such as: Count number of 'islands' in 2D data set of 0/1, in array of arrays, where N-S and E-W touching defines island, but diagonal does not .

Resposta da entrevista

Sigiloso

10 de fev. de 2019

Traverse data, counting when land hit, then use recursive function to clear land of connected N-S and E-W so we will not count second time later. Pass all data and counter by reference, not by value, to avoid recursive function call allocating member variables, to allow maximum recursion depth before failing.