摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1]... 阅读全文
posted @ 2016-10-25 18:29 N3verL4nd 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime c... 阅读全文
posted @ 2016-10-25 14:40 N3verL4nd 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". clas... 阅读全文
posted @ 2016-10-25 09:52 N3verL4nd 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". clas... 阅读全文
posted @ 2016-10-25 09:52 N3verL4nd 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation an... 阅读全文
posted @ 2016-10-25 09:47 N3verL4nd 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation an... 阅读全文
posted @ 2016-10-25 09:47 N3verL4nd 阅读(103) 评论(0) 推荐(0) 编辑