List
0
1
2
Insert
Add
Remove
Array
var matrix = new int[100];
List
var list = new List<int>();
var list = new List<int>();
list.Add(42);
var list = new List<int>();
list.Remove(42);
Head
Tail
0
1
2
3
4
Get prime numbers in an interval - [200, 300]
How would you delete a node (except the tail) in a singly linked list, given only access to that node.
Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, the linked list should become 1 -> 2 -> 4 after calling your function
Hint:
public class ListNode
{
public int val;
public ListNode next;
public ListNode(int x) { val = x; }
}
Undo & Redo operations
Stack
0
1
2
Push
Pop
Implement a simple printer
Queue
0
1
2
Dequeue
Enequeue