摘要: 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.) 阅读全文
posted @ 2017-05-30 19:00 JeffLai 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it. 阅读全文
posted @ 2017-05-30 17:13 JeffLai 阅读(111) 评论(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 climb to the top? Note: Given n will be a positive integer. 阅读全文
posted @ 2017-05-30 16:05 JeffLai 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Implement int sqrt(int x). Compute and return the square root of x. 阅读全文
posted @ 2017-05-30 15:56 JeffLai 阅读(117) 评论(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. 阅读全文
posted @ 2017-05-30 15:21 JeffLai 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string). 阅读全文
posted @ 2017-05-30 10:45 JeffLai 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leading zero, except the number 0 itself. The digits are stored such that the most significant digit is at the head of the list. 阅读全文
posted @ 2017-05-30 10:37 JeffLai 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Validate if a given string is numeric. 阅读全文
posted @ 2017-05-30 10:21 JeffLai 阅读(188) 评论(0) 推荐(0) 编辑