Data Structures and Algorithms Problems
techiedelight.com
techiedelight.com
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.
http://www.techiedelight.com/data-structures-and-algorithms-...
What do you think std:array are?
So C array equivalent = std::array, not std::vector.
Imitating C arrays with std::array is the perfect example of bastardized C/C++ code.
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.
Either way I would argue that using sizeof in that way is a sketchy practise.