###### 19. Remove Nth Node From End of List

Problem Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the en

Read MorePrimer on Python, Algorithms and Data Structure

Problem Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the en

Read MoreProblem Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n. Example 1: Input: n = 12 Output: 3 Explanation: 12 = 4 + 4 + 4.

Read MoreProblem Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). For example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 /

Read MoreProblems There are three ways to traverse a binary tree: preorder, inorder and postorder. On Leetcode, there are three problems 144. Binary Tree Preorder Traversal Given a binary tree, return the preo

Read MoreProblems There are three ways to traverse a binary tree: preorder, inorder and postorder. On Leetcode, there are three problems 144. Binary Tree Preorder Traversal Given a binary tree, return the preo

Read MoreDefinition What are Hash Tables? Hash Tables are key-value pairs key must be immutable Hash Function Hash functions convert the value to key One big challenge is to calculate the key more evenly

Read MoreProblem Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list – head = [4,5,1,9], which looks like following: 4->5->

Read MoreProblem Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list’s nodes, only nodes itself may be changed. Example: Given 1->2->3-

Read MoreProblem Remove all elements from a linked list of integers that have value val. Example: Input: 1->2->6->3->4->5->6, val = 6 Output: 1->2->3->4->5 Thought Process the r

Read More