Design a data structure where insertion, deletion, data access and get random element are all done in O(1), i.e., constant time. (Without using STL or Hash tables)
Development Interview Questions
137,190 development interview questions shared by candidates
Many sticks with length, every time combine two, the cost is the sum of two sticks' length. Finally, it will become a stick, what's the minimum cost?
Most efficient way to find the most frequent number (0-255) in a string of numbers
One of the question was on Designing & Code a TTL Cache with some modifications
What is a class?
Find count of unique characters in a given string
Given a string of format '2+3*2-1', calculate and return the result. No parenthesis in the input, just integers and + - * / operators. Operator precedence has to be considered. Linear time complexity and minimal data structure use is preferred.
Probability of a knight making a valid move on NxN matrix in m steps.
Given a triangle, determine if its a scalene, equilateral, isosceles or neither... required knowledge of triangle properties, I learnt these properties about two decades ago so ofcourse I was fuzzy on the details, completely unexpected
Given an unfair coin, devise an algorithm to produce a fair coin's output.
Viewing 281 - 290 interview questions