摘要:
Reverse digits of an integer. If the integer's last digit is 0, what should the output be? ie, cases such as 10, 100.Did you notice that the reversed 阅读全文
摘要:
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes 阅读全文
摘要:
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
摘要:
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo 阅读全文
摘要:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文
摘要:
1、在Java中,创建一个字符串有两种方式 String x = "abc";String y = new String("abc"); 这两种方式有什么区别呢? 2、双引号("")和构造器 第一个案例: String a = "abcd";String b = "abcd";System.out. 阅读全文
摘要:
1、在Java中,String类是不可变类,一个不可变类是一个简单的类,并且这个的实例也不能被修改, 这个类的实例创建的时候初始化所有的信息,并且这些信息不能够被修改 2、字符串常量池 字符串常量池是方法区中一块特殊的存储区域,当创建一个字符串常量的时候,判断该字符串字在符串字符串常量池中是否已经存 阅读全文
摘要:
1、substring()方法做了什么? substring(beginIndex,endIndex)方法返回一个从beginIndex到endIndex-1的字符串 String x = "abcdef"; x = x.substring(1,3); System.out.println(x); 阅读全文
摘要:
声明一个字符串引用变量: String s = "abcd"; s是一个引用变量,指向 堆内存中的字符串常量 "abcd" 再声明一个字符串引用变量: String s2 = s; 把s变量赋值给s2,那么 s 和 s2 两个引用变量同时指向堆内存中的字符串常量 "abcd" 改变字符串: s = 阅读全文
摘要:
The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users tabl 阅读全文