摘要: part 1 给一串0到9的数字,返回最小可以组成的整数,以string返回 比如 [1, 3, 3, 4, 2] -> "12334" 所有数字用一遍,0除外,比如[0, 1, 2]就返回12 part 2 part1的基础上返回值要大于或等于一个lower bound 1 from collec 阅读全文
posted @ 2026-03-02 11:36 北叶青藤 阅读(2) 评论(0) 推荐(0)
摘要: You are given an elevation map represents as an integer array heights where heights[i] representing the height of the terrain at index i. The width at 阅读全文
posted @ 2026-02-28 13:43 北叶青藤 阅读(3) 评论(0) 推荐(0)
摘要: Given a mapping from keywords to tags and a user review, replace the keywords in the review with the format [<tag>]{<keyword>}. For example: Given map 阅读全文
posted @ 2026-02-25 12:36 北叶青藤 阅读(2) 评论(0) 推荐(0)
摘要: Design a retryer function that takes an asynchronous function and a maximum number of retries. The retry delay should grow exponentially (e.g., 2 seco 阅读全文
posted @ 2026-02-25 10:23 北叶青藤 阅读(2) 评论(0) 推荐(0)
摘要: In a project, you have a list of required skills req_skills, and a list of people. The ith person people[i] contains a list of skills that the person 阅读全文
posted @ 2026-02-23 13:48 北叶青藤 阅读(4) 评论(0) 推荐(0)
摘要: "You are given an array like [5, 4, 3, 2, 1, 3, 4, 0, 3, 4] Part 1:Print a terrain where each number represents the height of a column at that index. 阅读全文
posted @ 2026-02-23 08:48 北叶青藤 阅读(1) 评论(0) 推荐(0)
摘要: 给定 n 个 hotel,每个 hotel 对应一个列表,里面的数字代表房源空闲的日期,还有一个可以请求的日期范围 [start_date, end_date]。 然后把这个区间能够 split 成连续的两段,分别能够找到两个 hotel 来满足这个对应区间,且左右不能来回 overlapping( 阅读全文
posted @ 2026-02-23 08:24 北叶青藤 阅读(1) 评论(0) 推荐(0)
摘要: Maximize task profits by their ddl. input: [(taskName, ddl, profit)], output: ([taskOrder], maxProfit) 每个task只需要花一天时间,一天只可以做一个task 1 def maximize_task 阅读全文
posted @ 2026-02-22 14:43 北叶青藤 阅读(3) 评论(0) 推荐(0)
摘要: 是一个滑雪选手从高山上往下滑,会遇到不同的checkpoint,每一个checkpoint有自己的point,然后每个edge有distance。经过每一个checkpoint所得到的score是通过一个包含point和distance的式子算出来的(比如2 * point +distance之类的 阅读全文
posted @ 2026-02-20 14:01 北叶青藤 阅读(3) 评论(0) 推荐(0)
摘要: You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some index i (0-indexed) with 0 < i < arr.length - 1 阅读全文
posted @ 2026-01-02 08:12 北叶青藤 阅读(6) 评论(0) 推荐(0)