随笔分类 -  LeetCode

上一页 1 2 3 4 5 6 7 8 9 10 ··· 61 下一页
摘要:Given a callable function f(x, y) with a hidden formula and a value z, reverse engineer the formula and return *all positive integer pairs x and y whe 阅读全文
posted @ 2021-10-12 12:28 Grandyang 阅读(414) 评论(0) 推荐(0)
摘要:We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime,  阅读全文
posted @ 2021-10-11 02:04 Grandyang 阅读(1946) 评论(0) 推荐(0)
摘要:You are given a string containing only 4 kinds of characters 'Q', 'W', 'E' and 'R'. A string is said to be balancedif each of its characters appears n 阅读全文
posted @ 2021-10-07 23:28 Grandyang 阅读(521) 评论(1) 推荐(0)
摘要:Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order. If a folde 阅读全文
posted @ 2021-10-06 11:46 Grandyang 阅读(400) 评论(0) 推荐(0)
摘要:You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight 阅读全文
posted @ 2021-10-03 07:23 Grandyang 阅读(600) 评论(0) 推荐(0)
摘要:n passengers board an airplane with exactly n seats. The first passenger has lost the ticket and picks a seat randomly. But after that, the rest of pa 阅读全文
posted @ 2021-10-01 11:56 Grandyang 阅读(1033) 评论(0) 推荐(0)
摘要:Given an array nums of positive integers, return the longest possible length of an array prefix of nums, such that it is possible to remove exactly on 阅读全文
posted @ 2021-09-27 08:58 Grandyang 阅读(574) 评论(0) 推荐(0)
摘要:A die simulator generates a random number from 1 to 6 for each roll. You introduced a constraint to the generator such that it cannot roll the number  阅读全文
posted @ 2021-09-23 12:21 Grandyang 阅读(861) 评论(0) 推荐(0)
摘要:On an 8x8 chessboard, there can be multiple Black Queens and one White King. Given an array of integer coordinates queens that represents the position 阅读全文
posted @ 2021-09-17 23:53 Grandyang 阅读(433) 评论(0) 推荐(0)
摘要:Balanced strings are those that have an equal quantity of 'L' and 'R' characters. Given a balanced string s, split it in the maximum amount of balance 阅读全文
posted @ 2021-09-13 23:22 Grandyang 阅读(704) 评论(0) 推荐(0)
摘要:Given an integer n, your task is to count how many strings of length n can be formed under the following rules: Each character is a lower case vowel ( 阅读全文
posted @ 2021-09-12 11:18 Grandyang 阅读(628) 评论(0) 推荐(0)
摘要:In a gold mine grid of size m x n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty. Return the ma 阅读全文
posted @ 2021-09-10 12:54 Grandyang 阅读(766) 评论(0) 推荐(0)
摘要:Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that th 阅读全文
posted @ 2021-09-08 12:14 Grandyang 阅读(619) 评论(0) 推荐(1)
摘要:We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to the same position. In one step, we can change the 阅读全文
posted @ 2021-09-05 02:39 Grandyang 阅读(487) 评论(0) 推荐(0)
摘要:In an n*n grid, there is a snake that spans 2 cells and starts moving from the top left corner at (0, 0) and (0, 1). The grid has empty cells represen 阅读全文
posted @ 2021-09-04 11:09 Grandyang 阅读(568) 评论(0) 推荐(0)
摘要:You are given a string s and an integer k, a k duplicate removal consists of choosing k adjacent and equal letters from s and removing them, causing t 阅读全文
posted @ 2021-08-31 23:51 Grandyang 阅读(992) 评论(0) 推荐(0)
摘要:You are given two strings s and t of the same length. You want to change s to t. Changing the i-th character of s to i-th character of t costs |s[i] - 阅读全文
posted @ 2021-08-29 02:55 Grandyang 阅读(481) 评论(0) 推荐(0)
摘要:Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Exam 阅读全文
posted @ 2021-08-29 02:05 Grandyang 阅读(707) 评论(0) 推荐(0)
摘要:Design a Skiplist without using any built-in libraries. A skiplist is a data structure that takes O(log(n)) time to add, erase and search. Comparing w 阅读全文
posted @ 2021-08-28 09:09 Grandyang 阅读(729) 评论(0) 推荐(0)
摘要:There are n items each belonging to zero or one of m groups where group[i] is the group that the i-th item belongs to and it's equal to -1 if the i-th 阅读全文
posted @ 2021-08-25 23:14 Grandyang 阅读(614) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 10 ··· 61 下一页
Fork me on GitHub