加载中...
分类详情
中等 分类
1029-两地调度(Two City Scheduling)
原文链接: https://leetcode-cn.com/problems/two-city-scheduling 英文原文A company is planning to interview 2n people. Given the array costs where costs[i] = [aCosti, bCosti], the cost of flying the ith person to city a is aCosti, and the cost of flying the it…
2021-12-03
1035-不相交的线(Uncrossed Lines)
原文链接: https://leetcode-cn.com/problems/uncrossed-lines 英文原文You are given two integer arrays nums1 and nums2. We write the integers of nums1 and nums2 (in the order they are given) on two separate horizontal lines. We may draw connecting lines: a stra…
2021-12-03
1117-H2O 生成(Building H2O)
原文链接: https://leetcode-cn.com/problems/building-h2o 英文原文There are two kinds of threads: oxygen and hydrogen. Your goal is to group these threads to form water molecules. There is a barrier where each thread has to wait until a complete molecule can b…
2021-12-03
1115-交替打印FooBar(Print FooBar Alternately)
原文链接: https://leetcode-cn.com/problems/print-foobar-alternately 英文原文Suppose you are given the following code: class FooBar { public void foo() { for (int i = 0; i < n; i++) { print("foo"); } } public void bar() { for (int i = 0; i < n; i++) { print("…
2021-12-03
1105-填充书架(Filling Bookcase Shelves)
原文链接: https://leetcode-cn.com/problems/filling-bookcase-shelves 英文原文You are given an array books where books[i] = [thicknessi, heighti] indicates the thickness and height of the ith book. You are also given an integer shelfWidth. We want to place the…
2021-12-03