5 pointers interview questions, asked at Microsoft, Meta, Nvidia and 1 more company. Last asked Oct 2026.
Aligned malloc and matching free in CCodingLockedWrite an allocator in C that hands out memory starting at an address that is a multiple of a requested alignment, and the function that gives that memory back. You may use only…
Lowest common ancestor with parent pointersCodingEach node of a binary tree has value, left, right and parent fields. You are given references to two nodes p and q of the same tree, but not the root. Return their lowest common…
Last asked Feb 2026
Populate next pointers in a perfect binary treeCodingYou are given a perfect binary tree: every internal node has two children and all leaves are on the same level. Each node has left, right and next. Set every node's next to the…
Last asked Feb 2026
Reverse nodes in k-groupCodingGiven the head of a singly linked list and an integer k, reverse the nodes in each consecutive block of k nodes and return the new head. If fewer than k nodes remain at the end…