Pointers, linked list operations, tree traversals, and Java OOP
Filed under Veritas
The question
Explain pointer mechanics and memory management (`int *p = new int[5]`, re-assignment, and `const int *a` vs `int const *b`). Write code to reverse a number, find the middle of a singly linked list using slow/fast pointers, reverse a linked list, perform BST traversals, and solve the rainwater trapping problem. Also explain Java pillars of OOP, garbage collection differences with C++, overloading/overriding, and the Diamond problem.
No write-up yet. Related questions below have one.
Related Veritas questions
Collected from public candidate posts and coding forums. Updated Nov 2026.