
LeetCode
文章平均质量分 65
猫猫被注册了
这个作者很懒,什么都没留下…
展开
-
LeetCode389. Find the Difference
Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was原创 2016-08-29 10:26:26 · 1012 阅读 · 0 评论 -
LeetCode344. Reverse String
Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".反转字符串思路:对折交换即可完成代码如下:char* reverseString(char* s){ int i;原创 2016-08-29 11:06:49 · 399 阅读 · 0 评论 -
LeetCode338. Counting Bits
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 and return them as an array.Example:For num = 5原创 2016-08-29 21:37:32 · 390 阅读 · 0 评论 -
160. Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘原创 2017-06-30 21:08:18 · 280 阅读 · 0 评论