上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 76 下一页
摘要: Given the number k, return the minimum number of Fibonacci numbers whose sum is equal to k, whether a Fibonacci number could be used multiple times. T 阅读全文
posted @ 2020-09-24 15:34 Schwifty 阅读(163) 评论(0) 推荐(0)
摘要: On a 2-dimensional grid, there are 4 types of squares: 1 represents the starting square. There is exactly one starting square. 2 represents the ending 阅读全文
posted @ 2020-09-24 04:07 Schwifty 阅读(107) 评论(0) 推荐(0)
摘要: You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot turn around an 阅读全文
posted @ 2020-09-23 23:47 Schwifty 阅读(295) 评论(0) 推荐(0)
摘要: Given a positive integer N, how many ways can we write it as a sum of consecutive positive integers? Example 1: Input: 5 Output: 2 Explanation: 5 = 5 阅读全文
posted @ 2020-09-17 23:17 Schwifty 阅读(169) 评论(0) 推荐(0)
摘要: On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: "G": go straight 1 unit; "L 阅读全文
posted @ 2020-09-17 23:04 Schwifty 阅读(165) 评论(0) 推荐(0)
摘要: Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231. Find the maximum result of ai XOR aj, where 0 ≤ i, j < n. Could you do t 阅读全文
posted @ 2020-09-17 03:55 Schwifty 阅读(146) 评论(0) 推荐(0)
摘要: You are given a list of preferences for n friends, where n is always even. For each person i, preferences[i] contains a list of friends sorted in the  阅读全文
posted @ 2020-09-16 10:27 Schwifty 阅读(226) 评论(0) 推荐(0)
摘要: Given a rows x cols matrix mat, where mat[i][j] is either 0 or 1, return the number of special positions in mat. A position (i,j) is called special if 阅读全文
posted @ 2020-09-16 08:37 Schwifty 阅读(246) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at depth 阅读全文
posted @ 2020-09-11 08:10 Schwifty 阅读(149) 评论(0) 推荐(0)
摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2020-09-11 07:02 Schwifty 阅读(144) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 76 下一页