xinyu04

导航

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页

2022年8月4日 #

LeetCode 572 Subtree of Another Tree

摘要: Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and 阅读全文

posted @ 2022-08-04 04:27 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

2022年8月3日 #

LeetCode 117 Populating Next Right Pointers in Each Node II

摘要: Given a binary tree struct Node { int val; Node *left; Node *right; Node *next; } Populate each next pointer to point to its next right node. If there 阅读全文

posted @ 2022-08-03 16:00 Blackzxy 阅读(16) 评论(0) 推荐(0) 编辑

MathProblem 85 Five pirates and a 1000 coins problem

摘要: Five pirates have come across a treasure of 1000 coins. According to pirate rules the pirate of highest rank must make a suggestion on how to divide t 阅读全文

posted @ 2022-08-03 06:25 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑

MathProblem 83 To confess or not confess problem

摘要: You and your partner in crime are both arrested and questioned separately. You are offered a chance to confess, in which you agree to testify against 阅读全文

posted @ 2022-08-03 05:35 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

LeetCode 239 Sliding Window Maximum 单调队列 [Hard]

摘要: You are given an array of integers nums, there is a sliding window of size $k$ which is moving from the very left of the array to the very right. You 阅读全文

posted @ 2022-08-03 02:27 Blackzxy 阅读(9) 评论(0) 推荐(0) 编辑

2022年8月2日 #

LeetCode 547 Number of Provinces 连通块个数

摘要: There are $n$ cities. Some of them are connected, while some are not. If city $a$ is connected directly with city $b$, and city $b$ is connected direc 阅读全文

posted @ 2022-08-02 18:01 Blackzxy 阅读(27) 评论(0) 推荐(0) 编辑

LeetCode 200 Number of Islands

摘要: Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by wa 阅读全文

posted @ 2022-08-02 14:55 Blackzxy 阅读(7) 评论(0) 推荐(0) 编辑

MathProblem 20 Nine minute egg problem

摘要: You are a cook in a remote area with no clocks or other way of keeping time other than a 4 minute hourglass and a 7 minute hourglass. You do have a st 阅读全文

posted @ 2022-08-02 03:44 Blackzxy 阅读(15) 评论(0) 推荐(0) 编辑

LeetCode 454 4Sum II

摘要: Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that: $0 \le i, j, k, l < n$ n 阅读全文

posted @ 2022-08-02 03:20 Blackzxy 阅读(8) 评论(0) 推荐(0) 编辑

2022年8月1日 #

LeetCode 209 Minimum Size Subarray Sum 滑动窗口 & 二分答案

摘要: Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray [numsl, numsl+1, ..., numsr 阅读全文

posted @ 2022-08-01 23:56 Blackzxy 阅读(19) 评论(0) 推荐(0) 编辑

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页