随笔分类 -  leetcode

上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要:Shuffle the Array Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,.. 阅读全文
posted @ 2023-03-04 12:19 iyiluo 阅读(14) 评论(0) 推荐(0)
摘要:Day of the Year Given a string date representing a Gregorian calendar date formatted as YYYY-MM-DD, return the day number of the year. Example 1: Inpu 阅读全文
posted @ 2023-03-04 12:19 iyiluo 阅读(20) 评论(0) 推荐(0)
摘要:Day of the Week Given a date, return the corresponding day of the week for that date. The input is given as three integers representing the day, month 阅读全文
posted @ 2023-03-04 12:19 iyiluo 阅读(20) 评论(0) 推荐(0)
摘要:Lemonade Change At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you and order one at a time (in the order s 阅读全文
posted @ 2023-02-27 21:23 iyiluo 阅读(32) 评论(0) 推荐(0)
摘要:Divisor Game Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a number n on the chalkboard. On each player's tu 阅读全文
posted @ 2023-02-27 21:22 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Valid Boomerang Given an array points where points[i] = [xi, yi] represents a point on the X-Y plane, return true if these points are a boomerang. A b 阅读全文
posted @ 2023-02-27 21:22 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Remove All Adjacent Duplicates In String You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing tw 阅读全文
posted @ 2023-02-27 21:22 iyiluo 阅读(26) 评论(0) 推荐(0)
摘要:Find the Town Judge In a town, there are n people labeled from 1 to n. There is a rumor that one of these people is secretly the town judge. If the to 阅读全文
posted @ 2023-02-27 21:21 iyiluo 阅读(31) 评论(0) 推荐(0)
摘要:Unique Morse Code Words International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: ' 阅读全文
posted @ 2023-02-27 21:21 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要:Maximum Number of Balloons Given a string text, you want to use the characters of text to form as many instances of the word "balloon" as possible. Yo 阅读全文
posted @ 2023-02-27 21:21 iyiluo 阅读(27) 评论(0) 推荐(0)
摘要:Split a String in Balanced Strings Balanced strings are those that have an equal quantity of 'L' and 'R' characters. Given a balanced string s, split 阅读全文
posted @ 2023-02-27 21:20 iyiluo 阅读(30) 评论(0) 推荐(0)
摘要:Reformat Data Given a date string in the form Day Month Year, where: Day is in the set {"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}. Month is in 阅读全文
posted @ 2023-02-27 21:20 iyiluo 阅读(26) 评论(0) 推荐(0)
摘要:Shuffle String You are given a string s and an integer array indices of the same length. The string s will be shuffled such that the character at the 阅读全文
posted @ 2023-02-27 21:19 iyiluo 阅读(29) 评论(0) 推荐(0)
摘要:Kth Missing Positive Number Given an array arr of positive integers sorted in a strictly increasing order, and an integer k. Return the kth positive i 阅读全文
posted @ 2023-02-27 21:19 iyiluo 阅读(25) 评论(0) 推荐(0)
摘要:Defanging an IP Address Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." 阅读全文
posted @ 2023-02-27 21:18 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要:Verifying an Alien Dictionary In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The orde 阅读全文
posted @ 2023-02-27 21:18 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Kth Largest Element in a Stream Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted orde 阅读全文
posted @ 2023-02-15 21:26 iyiluo 阅读(26) 评论(0) 推荐(0)
摘要:Min Cost Climbing Stairs You are given an integer array cost where cost[i] is the cost of ith step on a staircase. Once you pay the cost, you can eith 阅读全文
posted @ 2023-02-15 21:26 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Largest Number At Least Twice of Others You are given an integer array nums where the largest integer is unique. Determine whether the largest element 阅读全文
posted @ 2023-02-15 21:25 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要:Shortest Completing Word Given a string licensePlate and an array of strings words, find the shortest completing word in words. A completing word is a 阅读全文
posted @ 2023-02-15 21:25 iyiluo 阅读(19) 评论(0) 推荐(0)

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