摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 合并两个有序链表 阅读全文
posted @ 2018-09-11 23:48 鸭子船长 阅读(170) 评论(0) 推荐(0)
摘要: Given two binary strings, return their sum (also a binary string). For example,a ="11"b ="1"Return"100". 阅读全文
posted @ 2018-09-11 23:12 鸭子船长 阅读(453) 评论(0) 推荐(0)
摘要: Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended for the 阅读全文
posted @ 2018-09-11 23:01 鸭子船长 阅读(613) 评论(0) 推荐(0)
摘要: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a 阅读全文
posted @ 2018-09-11 22:40 鸭子船长 阅读(156) 评论(0) 推荐(0)
摘要: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You shou 阅读全文
posted @ 2018-09-11 22:29 鸭子船长 阅读(225) 评论(0) 推荐(0)
摘要: Implementint sqrt(int x). Compute and return the square root of x. 逐次逼近 阅读全文
posted @ 2018-09-11 22:15 鸭子船长 阅读(164) 评论(0) 推荐(0)
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2018-09-11 22:05 鸭子船长 阅读(253) 评论(0) 推荐(0)
摘要: 题目描述 Given an absolute path for a file (Unix-style), simplify it. For example,path ="/home/", =>"/home"path ="/a/./b/../../c/", =>"/c" click to show c 阅读全文
posted @ 2018-09-11 21:48 鸭子船长 阅读(344) 评论(0) 推荐(0)
摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文
posted @ 2018-09-11 21:34 鸭子船长 阅读(265) 评论(0) 推荐(0)
摘要: 题目描述 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did you use ext 阅读全文
posted @ 2018-09-11 21:07 鸭子船长 阅读(208) 评论(0) 推荐(0)