摘要: 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)