## 279. Perfect Squares

###### 279. Perfect Squares

Problem 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.

## Iterative Traversal for a Binary Tree

###### Iterative Traversal for a Binary Tree

Problems 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

## Hash Tables

###### Hash Tables

Definition 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

## 237. Delete Node in a Linked List

###### 237. Delete Node in a Linked List

Problem 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-&gt

## 24. Swap Nodes in Pairs

###### 24. Swap Nodes in Pairs

Problem 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-