전체 글 (87) 썸네일형 리스트형 [LeetCode] 60. Can Place Flowers You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots.Given an integer array flowerbed containing 0's and 1's, where 0 means empty and 1 means not empty, and an integer n, return true if n new flowers can be planted in the flowerbed without violating the no-adjacent-flowers rule and false otherwise. My answer is t.. [LeetCode] 374. Guess Number Higher or Lower 374. Guess Number Higher or Lower We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess.You call a pre-defined API int guess(int num), which returns three possible results:-1: Your guess is higher than the number I picked .. [LeetCode] 62. Unique Paths 62. Unique PathsThere is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n - 1]). The robot can only move either down or right at any point in time.Given the two integers m and n, return the number of possible unique paths that the robot can take to reach the bottom-right cor.. 이전 1 2 3 4 ··· 29 다음