Be able to discuss the big-O complexity of your approaches. Don't forget to brush up on your data structures like lists, arrays, hash tables, hash maps,
stacks, queues, graphs, trees, heaps. Also sorts, searches, and traversals(BFS, DFS). Also review recursion and iterative approaches.

Use the programming language you're best at. It's important to write your solution correctly and in time, so use the language you are most familiar with.

Find and fix the bugs by yourself: Don't wait for the interviewer to find them for you.

Use the hints you are given: Usually, the interviewer knows the question well enough to know which hints will help you next if you get stuck.

Find and fix the bugs by yourself: Don't wait for the interviewer to find them for you.

Use the hints you are given: Usually, the interviewer knows the question well enough to know which hints will help you next if you get stuck.

Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1-&...

Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1-&...

Find Duplicate in Array

Given a read only array of n + 1 integers between 1 and n, find one number that repeats in linear time using less than O(n) space and traversing the st...

Median of Array

There are two sorted arrays A and B of size m and n respectively.
Find the median of the two sorted arrays ( The median of the array formed by merging...

Sorted Array To Balanced BST

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
Balanced tree : a height-balanced binary tree is ...

Max Continuous Series of 1s

You are given with an array of 1s and 0s. And you are given with an integer M, which signifies number of flips allowed.
Find the position of zeros whic...

Flip

You are given a binary string(i.e. with characters 0 and 1) S consisting of characters S1, S2, …, SN. In a single operation, you can choose two indices...