原创 378. Kth Smallest Element in a Sorted Matrix(Leetcode每日一題-2020.07.02)

Problem Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smalles

原创 718. Maximum Length of Repeated Subarray(Leetcode每日一題-2020.07.01)

Problem Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Exa

原创 劍指 Offer 09. 用兩個棧實現隊列(Leetcode每日一題-2020.06.30)

Problem 用兩個棧實現一個隊列。隊列的聲明如下,請實現它的兩個函數 appendTail 和 deleteHead ,分別完成在隊列尾部插入整數和在隊列頭部刪除整數的功能。(若隊列中沒有元素,deleteHead 操作返回

原创 139. Word Break(Leetcode每日一題-2020.06.25)

Problem Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s c

原创 面試題 16.18. Pattern Matching LCCI(Leetcode每日一題-2020.06.22)

Problem You are given two strings, pattern and value. The pattern string consists of just the letters a and b, desc

原创 124. Binary Tree Maximum Path Sum(Leetcode每日一題-2020.06.21)

Problem Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequen

原创 9. Palindrome Number(Leetcode每日一題-2020.06.10)

Problem Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as

原创 1028. Recover a Tree From Preorder Traversal(Leetcode每日一題-2020.06.18)

Problem We run a preorder depth first search on the root of a binary tree. At each node in this traversal, we outpu

原创 14. Longest Common Prefix(Leetcode每日一題-2020.06.15)

Problem Write a function to find the longest common prefix string amongst an array of strings. If there is no commo

原创 1014. Best Sightseeing Pair(Leetcode每日一題-2020.06.17)

Problem Given an array A of positive integers, A[i] represents the value of the i-th sightseeing spot, and two sigh

原创 209. Minimum Size Subarray Sum(Leetcode每日一題-2020.06.28)

Problem Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous sub

原创 54. Spiral Matrix&面試題29. 順時針打印矩陣(Leetcode每日一題-2020.06.05)

Problem Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Ex

原创 990. Satisfiability of Equality Equations(Leetcode每日一題-2020.06.08)

Problem Given an array equations of strings that represent relationships between variables, each string equations[i

原创 128. Longest Consecutive Sequence(Leetcode每日一題-2020.06.06)

Problem Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your alg

原创 16. 3Sum Closest(Leetcode每日一題-2020.06.24)

Problem Given an array nums of n integers and an integer target, find three integers in nums such that the sum is c