Quantcast
Channel: Shekhar Gulati
Viewing all articles
Browse latest Browse all 147

Why it’s hard for programmers to write a program to flatten a list?

$
0
0
I take many programming interviews at my current organisation. These days one of my favourite interview question is to flatten a nested list structure. I give user an input [1,[2,3], [4, [5,6]]] and ask them to write a program that will give output [1,2,3,4,5,6]. So, far I have asked this question to at least 20 candidates […]

Viewing all articles
Browse latest Browse all 147

Trending Articles