Insertion Sort List

Sort a linked list using insertion sort.

Add Two Numbers

You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s digit is at the head of the list. Write a function that adds the two numbers and returns the sum as a linked list.

Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.

Flip Bits

Determine the number of bits required to flip if you want to convert integer n to integer m.

Add Binary

Given two binary strings, return their sum (also a binary string).

Convert Sorted Array to Binary Search Tree With Minimal Height

Given a sorted (increasing order) array, Convert it to create a binary tree with minimal height. There may exist multiple valid solutions, return any of them.

Plus One

Given a non-negative number represented as an array of digits, plus one to the number.

Reverse Integer

Reverse digits of an integer. Returns 0 when the reversed integer overflows (signed 32-bit integer).


You have two every large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of T1.

Delete Node in the Middle of Singly Linked List

Implement an algorithm to delete a node in the middle of a singly linked list, given only access to that node.