原创 Leetcode-Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values. F

原创 Leetcode-Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from th

原创 Leetcode-Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from t

原创 Leetcode-Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers,

原创 Leetcode-Path Sum

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

原创 Leetcode-Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and re

原创 Leetcode-Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head. Fo

原创 Leetcode-Rotate List

Given a list, rotate the list to the right by k places, where k is non-neg

原创 Leetcode-Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return i

原创 Leetcode-Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3},

原创 Leetcode分類-樹

題型分類------樹 一、樹的遍歷 1. Binary Tree Preorder Traversal: 使用遞歸和非遞歸 前序遍歷,主要考察非

原创 Leetcode-Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes o

原创 題型分類------字符串和數組(Doing)

1. [1]. Reverse Words in a String:空格的處理 2. Evaluate Reverse Polish Notatio

原创 Leetcode-Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level

原创 Leetcode-Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element a