原创 【leetcode】Unique Paths(動態規劃)
62. Unique Paths leetcode題目 題目描述 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagr
原创 【leetcode】在旋轉排序數組中查找(二分)
33. Search in Rotated Sorted Array leetcode題目描述 題目描述: Suppose an array sorted in ascending order is rotated at some piv
原创 【leetcode】二叉樹先序遍歷(stack)
144. Binary Tree Preorder Traversal leetcode題目 題目描述 Pick One Given a binary tree, return the preorder traversal of its
原创 【leetcode】二叉樹中序遍歷(stack)
94. Binary Tree Inorder Traversal leetcode題目 題目描述 Given a binary tree, return the inorder traversal of its nodes’ value
原创 【leetcode】Two Sum(unordered_map的使用)
1. Two Sum leetcode題目描述 題目描述: Given an array of integers, return indices of the two numbers such that they add up to a
原创 【leetcode】迴文串劃分(DFS)
131. Palindrome Partitioning leetcode題目 題目描述 Given a string s, partition s such that every substring of the partition i
原创 【leetcode】Unique Paths II(動態規劃)
63. Unique Paths II leetcode題目 題目描述 Discuss Pick One Follow up for “Unique Paths”: Now consider if some obstacles are
原创 【leetcode】已排序數組去重
26. Remove Duplicates from Sorted Array leetcode題目描述 題目描述: Given a sorted array, remove the duplicates in place such th
原创 【leetcode】查找插入位置(二分)
35. Search Insert Position leetcode題目描述 題目描述: Given a sorted array and a target value, return the index if the target i