08 2021 档案
摘要:难度 中等 题目 Leetcode: 这里有 n 个航班,它们分别从 1 到 n 进行编号。 有一份航班预订表 bookings ,表中第 i 条预订记录 bookings[i] = [firsti, lasti, seatsi] 意味着在从 firsti 到 lasti (包含 firsti 和
阅读全文
摘要:难度 中等 题目 Leetcode: You are given an array of positive integers w where w[i] describes the weight of ith index (0-indexed). We need to call the functio
阅读全文
摘要:难度 1400 题目 Codeforces: C. Given Length and Sum of Digits... time limit per test 1 second memory limit per test 256 megabytes You have a positive integ
阅读全文
摘要:难度 题目 Codeforces: B. Scenes From a Memory time limit per test 1 second memory limit per test 256 megabytes During the hypnosis session, Nicholas sudde
阅读全文
摘要:难度 中等 题目 Leetcode: All Paths From Source to Target Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n - 1, find all possible paths fr
阅读全文
摘要:难度 中等 题目 Leetcode: You are playing a simplified PAC-MAN game on an infinite 2-D grid. You start at the point [0, 0], and you are given a destination p
阅读全文
摘要:难度 1300 题目 Leetcode: D. Make a Power of Two time limit per test 1 second memory limit per test 256 megabytes You are given an integer nn. In 11 move,
阅读全文
摘要:难度 困难 题目 Leetcode: An attendance record for a student can be represented as a string where each character signifies whether the student was absent, la
阅读全文
摘要:难度 1800 题目 Codeforces: C. Mikasa time limit per test 1 second memory limit per test 256 megabytes You are given two integers n and m. Find the MEX of
阅读全文
摘要:难度 1200 题目 Codeforces: Mocha and Hiking The city where Mocha lives in is called Zhijiang. There are n+1n+1 villages and 2n−12n−1 directed roads in thi
阅读全文
摘要:难度 中等 题目 Leetcode: Out of Boundary Paths There is an m x n grid with a ball. The ball is initially at the position [startRow, startColumn]. You are al
阅读全文
摘要:难度 中等 题目 Leetcode: Count Unhappy Friends You are given a list of preferences for n friends, where n is always even. For each person i, preferences[i]
阅读全文
摘要:难度 困难 题目 Leetcode: Number of Digit One Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal
阅读全文
摘要:难度 1500 题目 Codeforces: C. Woodcutters time limit per test 1 second memory limit per test 256 megabytes Little Susie listens to fairy tales before bed
阅读全文
摘要:难度 中等 题目 Leetcode: Valid Triangle Number Given an integer array nums, return the number of triplets chosen from the array that can make triangles if w
阅读全文
摘要:难度 简单 题目 Leetcode: The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return t
阅读全文
摘要:难度 中等 题目 Leetcode: Circular Array Loop You are playing a game involving a circular array of non-zero integers nums. Each nums[i] denotes the number of
阅读全文
摘要:难度 困难 题目:Leetcode Shortest Path Visiting All Nodes You have an undirected, connected graph of n nodes labeled from 0 to n - 1. You are given an array
阅读全文
摘要:难度 中等 题目 Leetcode: Find Eventual Safe States We start at some node in a directed graph, and every turn, we walk along a directed edge of the graph. If
阅读全文
摘要:难度 中等 题目 Leetcode: Shortest Unsorted Continuous Subarray Given an integer array nums, you need to find one continuous subarray that if you only sort t
阅读全文
摘要:难度 中等 题目 Leetcode: You are given a network of n nodes, labeled from 1 to n. You are also given times, a list of travel times as directed edges times[i
阅读全文
浙公网安备 33010602011771号