You've a singly linked list where every node in the list has a field "random" which points to other node in the same list. Write a function to clone this list (create a new copy of the same). Don't use extra space (just the pointer variables are fine).
Development Interview Questions
137,207 development interview questions shared by candidates
How many gas stations are there in California?
Given a linked list with three fields: a data field, a next field and a random pointer field (which is a field that points to null or to an element in the linked list) write a function to return a copy of the linked list without destructively modifying the original linked list
Write a function that returns the longest palindrome in a string. Not just the first one or any palindrome, but the longest. The String is a long sequence of characters, spaces included.
Write a function that takes a String as a parameter. Count the number of A's in the String before you reach a C.
Find a duplicate integer in a list of length K with integers 1...K-1 and one duplicate. Do so in O(n) time with constant space.
How to create excel header string
Write a function that reverses the letters in each word using only one char buffer. E.g.: "I work at Microsoft" to "I krow ta tfosorciM"
Write a function to convert a number in Roman numeral form to a decimal representation.
Q: In an array that has one value for more than half of its elements, how can you find that value?
Viewing 521 - 530 interview questions