11 Bryan要加油

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 2k+

1024. Video Stitching(Leetcode每日一题-2020.10.24)--抄答案

ProblemYou are given a series of video clips from a sporting event that lasted T seconds. These video clips can be overlapping with each other and have varied lengths.Each video clip clips[i] is an interval: it starts at time clips[i][0] and ends at tim

2020-10-24 22:08:09

234. Palindrome Linked List(Leetcode每日一题-2020.10.23)

ProblemGiven a singly linked list, determine if it is a palindrome.Example1Input: 1->2Output: falseExample2Input: 1->2->2->1Output: trueSolution/** * Definition for singly-linked list. * struct ListNode { * int val; * L

2020-10-23 22:04:29

763. Partition Labels(Leetcode每日一题-2020.10.22)

ProblemA string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts.Note:S will hav

2020-10-23 22:03:09

925. Long Pressed Name(Leetcode每日一题-2020.10.21)

ProblemYour friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might get long pressed, and the character will be typed 1 or more times.You examine the typed characters of the keyboard. Return True if it is possible

2020-10-21 19:32:49

143. Reorder List(Leetcode每日一题-2020.10.20)

ProblemGiven a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You may not modify the values in the list’s nodes, only nodes itself may be changed.Example1Given 1->2->3->4, reorder it to 1->4->2->3.Exam

2020-10-20 21:18:10

844. Backspace String Compare(Leetcode每日一题-2020.10.19)

ProblemGiven two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character.Note that after backspacing an empty text, the text will continue empty.Note:1 <= S.length <= 2001 <= T.len

2020-10-20 21:16:51

19. Remove Nth Node From End of List(Leetcode每日一题-2020.10.18)

ProblemGiven the head of a linked list, remove the nth node from the end of the list and return its head.Constraints:The number of nodes in the list is sz.1 <= sz <= 300 <= Node.val <= 1001 <= n <= sz来源:力扣(LeetCode)链接:https://le

2020-10-18 21:41:13

52. N-Queens II(Leetcode每日一题-2020.10.17)

ProblemThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return the number of distinct solutions to the n-queens puzzle.ExampleInput: 4Output: 2Explanation: The

2020-10-17 21:28:54

977. Squares of a Sorted Array(Leetcode每日一题-2020.10.16)

ProblemGiven an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.Note:1 <= A.length <= 10000-10000 <= A[i] <= 10000A is sorted in non-decreasing order.

2020-10-17 21:27:21

116. Populating Next Right Pointers in Each Node(Leetcode每日一题-2020.10.15)

ProblemYou are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:struct Node {int val;Node *left;Node *right;Node *next;}Populate each next pointer

2020-10-15 21:49:00

AcWing 9. 分组背包问题

有 N 组物品和一个容量是 V 的背包。每组物品有若干个,同一组内的物品最多只能选一个。每件物品的体积是 vij,价值是 wij,其中 i 是组号,j 是组内编号。求解将哪些物品装入背包,可使物品总体积不超过背包容量,且总价值最大。输出最大价值。输入格式第一行有两个整数 N,V,用空格隔开,分别表示物品组数和背包容量。接下来有 N 组数据:每组数据第一行有一个整数 Si,表示第 i 个物品组的物品数量;每组数据接下来有 Si 行,每行有两个整数 vij,wij,用空格隔开,分别表示第 i

2020-10-14 22:27:22

1002. Find Common Characters(Leetcode每日一题-2020.10.14)--抄答案

ProblemGiven an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates). For example, if a character occurs 3 times in all strings but not 4 times, you need t

2020-10-14 21:25:55

AcWing 5. 多重背包问题 II

有 N 种物品和一个容量是 V 的背包。第 i 种物品最多有 si 件,每件体积是 vi,价值是 wi。求解将哪些物品装入背包,可使物品体积总和不超过背包容量,且价值总和最大。输出最大价值。输入格式第一行两个整数,N,V,用空格隔开,分别表示物品种数和背包容积。接下来有 N 行,每行三个整数 vi,wi,si,用空格隔开,分别表示第 i 种物品的体积、价值和数量。输出格式输出一个整数,表示最大价值。数据范围0<N≤10000<V≤20000<vi,wi,si≤200

2020-10-13 22:37:05

24. Swap Nodes in Pairs(Leetcode每日一题-2020.10.13)

ProblemGiven a linked list, swap every two adjacent nodes and return its head.You may not modify the values in the list’s nodes. Only nodes itself may be changed.Constraints:The number of nodes in the list is in the range [0, 100].0 <= Node.val &l

2020-10-13 21:03:32

530. Minimum Absolute Difference in BST&783. Minimum Distance... (Leetcode每日一题-2020.10.12)

ProblemGiven a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.Note:There are at least two nodes in this BST.ExampleSolution/** * Definition for a binary tree node. * struct TreeNode

2020-10-12 19:57:38

142. Linked List Cycle II(Leetcode每日一题-2020.10.10)

ProblemGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, po

2020-10-10 21:01:50

AcWing 4.多重背包问题 I

1小时12分

2020-10-09 22:12:36

141. Linked List Cycle(Leetcode每日一题-2020.10.09)

ProblemGiven head, the head of a linked list, determine if the linked list has a cycle in it.There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used

2020-10-09 21:59:17

344. Reverse String(Leetcode每日一题-2020.10.08)

ProblemWrite a function that reverses a string. The input string is given as an array of characters char[].Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.You may assume all th

2020-10-08 20:55:44

75. Sort Colors(Leetcode每日一题-2020.10.07)

ProblemGiven an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue.Here, we will use the integers 0, 1, and 2 to represent the color

2020-10-07 21:59:11

查看更多

勋章 我的勋章
  • GitHub
    GitHub
    绑定GitHub第三方账户获取
  • 阅读者勋章Lv1
    阅读者勋章Lv1
    授予在CSDN APP累计阅读博文达到3天的你,是你的坚持与努力,使你超越了昨天的自己。
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。
  • 分享小兵
    分享小兵
    成功上传3个资源即可获取