06 2015 档案
摘要:Set接口Set不允许包含相同的元素,如果试图把两个相同元素加入同一个集合中,add方法返回false。Set判断两个对象相同不是使用==运算符,而是根据equals方法。也就是说,只要两个对象用equals方法比较返回true,Set就不 会接受这两个对象。HashSetHashSet有以下特点...
阅读全文
摘要:题目:Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding eleme...
阅读全文
摘要:题目:判断一个数是不是回文数Determine whether an integer is a palindrome. Do this without extra space.思路:借助上一道求整数逆序的思路,判断逆序后的数和原数是否相等就行。要注意,负数都不是回文数11506 / 11506 te...
阅读全文
摘要:题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321思路:递归解答:1032 / 1032 test cases passed.Status: AcceptedRunt...
阅读全文
摘要:题目:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed fo...
阅读全文
摘要: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...
阅读全文
摘要:Daopackage com.example.hixin;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import ja...
阅读全文
摘要:最近通过学习,对fragment的使用有了新的认识。一开始接触android的时候,很是受不了这个fragment,总感觉它把一个简单的事情搞复杂啦,所以每次新建工程的时候总是固执的选择empty Activity但是后来发现这样写出来的代码移植的时候总是要该来该去,现在开始偏爱带fragment的...
阅读全文
摘要:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
阅读全文
摘要:自定义actionBar布局:标题居中,左边有返回按键 java文件里面使用:package com.tuyoung.wu;import com.example.toyoung.R;import android.app.ActionBar;import android.app....
阅读全文
摘要: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 ...
阅读全文
摘要:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
阅读全文
摘要:Given two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to endWord, such that:On...
阅读全文

浙公网安备 33010602011771号