- 博客(9)
- 资源 (3)
- 问答 (2)
- 收藏
- 关注
原创 蘑菇街2016校园招聘——回文串
import java.util.Scanner;/** * * ClassName:Solution * * * Description:给定一个串,通过添加一个字母将其变成“回文串” * * * @author sunnylinner */public class Solution { final String Y = "YES"; final
2016-03-30 13:45:26 447
原创 7. Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before coding.
2016-03-20 10:41:35 331
原创 6. ZigZag Conversion
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 font for better legibility)P A H NA P L S I I
2016-03-20 00:12:02 417
原创 4. Median of Two Sorted Arrays
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 should be O(log (m+n)).public class Solution { pu
2016-03-12 21:27:05 454
原创 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For
2016-03-10 14:36:25 315
原创 5. Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, and there exists one unique longest palindromic substring.public class Solution {
2016-03-09 18:01:14 383
原创 A + B + C Problem
Description已知N个不同的数a[1..N]。求能否从这些数中选出不同的三个数A、B、C,使得他们的和为S。Input多组数据,每组数据第一行有两个个整数N和S。(1 第二行有N个整数a[1], a[2], ..., a[n]。 (1 Output对于每组数据,如果可以,输出”YES”,否则输出”NO”,并换行。Sample Inpu
2016-03-09 17:57:51 579
原创 1.Two Sum
Given an array of integers, return indices of the two numbers suchthat they add up to a specific target.You may assume that each input would have exactly onesolution.public int[] twoSum(int[]
2016-03-09 15:35:54 268
原创 2. Add Two Numbers
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 digit. Add the two numbers and return it as a link
2016-03-09 15:03:08 345
var a = a || b,改用let,怎么写啊?
2018-10-18
TA创建的收藏夹 TA关注的收藏夹
TA关注的人