top | item 14043891

Data Structures and Algorithms Problems

59 points| coder007 | 9 years ago |techiedelight.com

11 comments

order
[+] quinnftw|9 years ago|reply
One nitpick (and this applies to almost every site of this genre, i.e. geeksforgeeks, hackerrank, etc.):

The code listed as "C++" is essentially C with ostreams. If I were interviewing someone and they claimed to know C++, and then used "sizeof(A) / sizeof(A[0])" to get the size of an array, I'd question how much C++ they actually knew. I understand that the focus here is mainly on problem solving and not language specific patterns, but when you advertise the site as a coding interview helper I think that the solution code should reflect that which should be written in an actual interview.

[+] RandomOpinion|9 years ago|reply
> If I were interviewing someone and they claimed to know C++, and then used "sizeof(A) / sizeof(A[0])" to get the size of an array, I'd question how much C++ they actually knew.

Or they've spent a lot of time in embedded systems development. Many of us write rather C-ish C++ because of the limitations of older compilers and the age of the code bases.

[+] huherto|9 years ago|reply
C++ is a large language that can be used in many different ways. People adopt a subset that is sensible for them. If you are interviewing C++ programmers, you should be aware of it.
[+] coder007|9 years ago|reply
So you prefer to use std::array over C arrays?