## LEETCODE 1564. Put Boxes Into the Warehouse I 解题思路分析

Given two arrays of positive integers `boxes` and `warehouse` representing the heights of some boxes of unit width, and the heights of `n` rooms in a warehouse, respectively. The warehouse’s rooms are labeled from `0` to `n - 1` from left to right where `warehouse[i]` (0-indexed) is the height of the `ith` room.

Boxes are put into the warehouse by the following rules:

• Boxes can’t be piled up.
• You can rearrange the order of the boxes.
• Boxes can only be pushed into the warehouse from left to right only.
• If the height of some room in the warehouse is less than the height of a box, then the box will be stopped before that room, so are the boxes behind it.

Return the maximum number of boxes you can put into the warehouse.

## LEETCODE 1561. Maximum Number of Coins You Can Get 解题思路分析

• 每一轮中，你将会选出 任意 3 堆硬币（不一定连续）。
• Alice 将会取走硬币数量最多的那一堆。
• 你将会取走硬币数量第二多的那一堆。
• Bob 将会取走最后一堆。
• 重复这个过程，直到没有更多硬币。

## LEETCODE 1553. Minimum Number of Days to Eat N Oranges 解题思路分析

• 吃掉一个橘子。
• 如果剩余橘子数 `n` 能被 2 整除，那么你可以吃掉 n/2 个橘子。
• 如果剩余橘子数 `n` 能被 3 整除，那么你可以吃掉 2*(n/3) 个橘子。

## LEETCODE 1545. Find Kth Bit in Nth Binary String 解题思路分析

• S1 = “0”
• 当 i > 1 时，Si = Si-1 + “1” + reverse(invert(Si-1))

• `S1 = "0"`
• `S2 = "011"`
• `S3 = "0111001"`
• `S4 = "011100110110001"`