Category: data structure
You are asked to remove all elements of value val from a integer linked list. For example, Remove 2 from the following list, 1 -> 2 -> 2 -> …
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For example, Given …
Question: Write a function to return the intersection of two arrays: For example, the intersection of and returns . The return array should only contain unique numbers and the …
Question: How to determine if a linked list has a cycle? The Singly Linked List is defined as follows: struct ListNode { int val; ListNode *next; ListNode(int x) : …
This is the technical phone interview question from Google. Google has offices in London but the call was from Google Switzerland (+41). The interview lasts for 45 minutes. Given …