摘要:
因博客园编辑不方便,故转至CSDN。 阅读全文
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
摘要:
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 阅读全文
摘要:
Given a sorted linked list, delete all duplicates such that each element appear only once. 给定一个有序数组,删除其中所有重复的元素,使每个元素只出现一次~ For example,Given 1->1->2, 阅读全文
摘要:
实现针对int类型的sqrt(int x)。计算并返回x的平方根,x确定为非负整数 Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative int 阅读全文
摘要:
给定两个二进制字符串,返回它们的和(也是一个二进制字符串) Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". lx223的解法 pub 阅读全文
摘要:
给定一个包含大写/小写字母和空格字符' '的字符串,返回字符串中最后一个单词的长度。 如果最后一个单词不存在,返回0.(自己理解有误,认为如"a "这样即最后一个单词不存在,实际并不是,对该字符串来说,最后一个单词是a,长度为1) 注意:一个单词被定义为由不为空的字符组成的序列,即不包含' '. G 阅读全文
摘要:
题目:将两个有序链表合并为一个新链表。该新链表必须是之前两个链表的节点合并而成。 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together t 阅读全文
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
摘要:
class Solution { public String longestCommonPrefix(String[] strs) { StringBuffer result = new StringBuffer(""); if (strs.length==0) return result.toSt 阅读全文