You have coins and you want to build a staircase with these coins. The staircase consists of rows where the ith row has exactly coins. The last row of the staircase may be incomplete.
Given the integer , return the number of complete rows of the staircase you will build.
Andy的作業
Allen的作業
xander的作業
Roger的作業
Wen的作業
Will的作業
Woody的作業
Andrew的作業
Stephen的作業
…Continue filling by yourself
Given the of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by level from leaf to root).
There are prison cells in a row and each cell is either occupied or vacant.
Each day, whether the cell is occupied or vacant changes according to the following rules:
Note that because the prison is a row, the first and the last cells in the row can't have two adjacent neighbors.
You are given an integer array where if the cell is occupied and if the cell is vacant, and you are given an integer .
Return the state of the prison after days (i.e., such changes described above).