## Queue

## Stack

## 347. Top K Frequent Elements

###### 347. Top K Frequent Elements

Problem Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input: nums = [1], k = 1 Output: [1] Note: Y

Read More## 112. Path Sum

###### 112. Path Sum

Problem Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Note: A leaf is a node with no children. Ex

Read More## 220. Contains Duplicate III

###### 220. Contains Duplicate III

Problem Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute dif

Read More## Dynamic Array

###### Dynamic Array

Dynamic Array In Array, I pre-defined the capacity The array’s size need to be smaller than its capacity Now I will define a dynamic array whose capacity will grow or shrink depending on array&

Read More## 257. Binary Tree Paths

###### 257. Binary Tree Paths

Problem Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] Explanation:

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

###### 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 More