随笔分类 -  LeetCode

上一页 1 2 3 4 5 6 7 ··· 20 下一页
摘要:Count Binary Substrings (E) 题目 Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and al 阅读全文
posted @ 2021-04-23 15:40 墨云黑 阅读(39) 评论(0) 推荐(0)
摘要:Brick Wall (M) 题目 There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but d 阅读全文
posted @ 2021-04-22 15:27 墨云黑 阅读(51) 评论(0) 推荐(0)
摘要:Triangle (M) 题目 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For examp 阅读全文
posted @ 2021-04-21 15:37 墨云黑 阅读(77) 评论(0) 推荐(0)
摘要:N-ary Tree Preorder Traversal (E) 题目 Given the root of an n-ary tree, return the preorder traversal of its nodes' values. Nary-Tree input serializatio 阅读全文
posted @ 2021-04-20 15:16 墨云黑 阅读(147) 评论(0) 推荐(0)
摘要:Combination Sum IV (M) 题目 Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up 阅读全文
posted @ 2021-04-19 15:52 墨云黑 阅读(54) 评论(0) 推荐(0)
摘要:Number of Submatrices That Sum to Target (H) 题目 Given a matrix and a target, return the number of non-empty submatrices that sum to target. A submatri 阅读全文
posted @ 2021-04-17 18:47 墨云黑 阅读(64) 评论(0) 推荐(0)
摘要:Remove All Adjacent Duplicates in String II (M) 题目 Given a string s, a k duplicate removal consists of choosing k adjacent and equal letters from s an 阅读全文
posted @ 2021-04-16 16:54 墨云黑 阅读(53) 评论(0) 推荐(0)
摘要:Fibonacci Number (E) 题目 The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum 阅读全文
posted @ 2021-04-15 17:36 墨云黑 阅读(42) 评论(0) 推荐(0)
摘要:Partition List (M) 题目 Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. Yo 阅读全文
posted @ 2021-04-14 15:26 墨云黑 阅读(53) 评论(0) 推荐(0)
摘要:Beautiful Arrangement II (M) 题目 Given two integers n and k, you need to construct a list which contains n different positive integers ranging from 1 t 阅读全文
posted @ 2021-04-12 17:23 墨云黑 阅读(79) 评论(0) 推荐(0)
摘要:Deepest Leaves Sum (M) 题目 Given the root of a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6, 阅读全文
posted @ 2021-04-11 15:25 墨云黑 阅读(36) 评论(0) 推荐(0)
摘要:Longest Increasing Path in a Matrix (H) 题目 Given an m x n integers matrix, return the length of the longest increasing path in matrix. From each cell, 阅读全文
posted @ 2021-04-10 16:05 墨云黑 阅读(51) 评论(0) 推荐(0)
摘要:Verifying an Alien Dictionary (E) 题目 In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. Th 阅读全文
posted @ 2021-04-09 15:39 墨云黑 阅读(47) 评论(0) 推荐(0)
摘要:Determine if String Halves Are Alike (E) 题目 You are given a string s of even length. Split this string into two halves of equal lengths, and let a be 阅读全文
posted @ 2021-04-07 15:37 墨云黑 阅读(63) 评论(0) 推荐(0)
摘要:Minimum Operations to Make Array Equal (M) 题目 You have an array arr of length n where arr[i] = (2 * i) + 1 for all valid values of i (i.e. 0 <= i < n) 阅读全文
posted @ 2021-04-06 16:23 墨云黑 阅读(72) 评论(0) 推荐(0)
摘要:Global and Local Inversions (M) 题目 We have some permutation A of [0, 1, ..., N - 1], where N is the length of A. The number of (global) inversions is 阅读全文
posted @ 2021-04-05 16:39 墨云黑 阅读(50) 评论(0) 推荐(0)
摘要:Design Circular Queue (M) 题目 Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations a 阅读全文
posted @ 2021-04-04 16:19 墨云黑 阅读(59) 评论(0) 推荐(0)
摘要:Ones and Zeroes (M) 题目 You are given an array of binary strings strs and two integers m and n. Return the size of the largest subset of strs such that 阅读全文
posted @ 2021-04-03 18:15 墨云黑 阅读(79) 评论(0) 推荐(0)
摘要:Palindrome Linked List (E) 题目 Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2 阅读全文
posted @ 2021-04-01 17:21 墨云黑 阅读(40) 评论(0) 推荐(0)
摘要:Stamping The Sequence (H) 题目 You want to form a target string of lowercase letters. At the beginning, your sequence is target.length '?' marks. You al 阅读全文
posted @ 2021-03-31 22:35 墨云黑 阅读(262) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 20 下一页