首先我们来简单看一下这道题的statement Problem Statement Note that in the following problem statement, all quotes and angle brackets are for clarity A certain vending machine delves out its goods from a rotating cylinder, which can rotate around in both clockw…
周赛时遇到的一道比较有意思的题目: Problem Statement There are N rooms in Maki's new house. The rooms are numbered from 0 to N-1. Some pairs of rooms are connected by bidirectional passages. The passages have the topology of a tree. That is, there are exactly N-…
一.题目 House Robber(一道Leetcode上的关于动态规划的简单题目)具体描述如下: There is a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent hous…