自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (1)
  • 收藏
  • 关注

原创 Insertion Sort List

Sort a linked list using insertion sort.分析:插入排序处理链表。借助一个helper 头节点,来避免比较过程中位置在头节点处的情况。/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next;

2015-10-26 17:19:18 442

原创 [leetcode] Palindrome Linked List

Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?分析:palindrome:回文字,左后看都是一样。O(1)常数运行空间,说明不能通过建立数组等其他数据结构的方式来处理。从左右看,都是一样,考

2015-10-23 18:12:38 353

原创 [Leetcode] Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the

2015-10-23 11:56:24 365

原创 [Merge Sort] Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.一、比较排序/** * Definition for singly-linked list. *

2015-10-22 11:04:32 466

原创 [Leetcode] Climbing Stairs

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?题意:台阶总数为n,每次爬1阶或者2阶层,求爬完台阶

2015-10-21 18:49:10 1031

原创 [Leetcode] Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may a

2015-10-21 17:46:03 435

原创 [Leetcode] Word Search

Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically

2015-10-21 16:11:28 1032

原创 [Leetcode]Word Pattern

Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.

2015-10-19 16:32:26 1165

原创 [Leetcode]Container With Most Water

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin

2015-10-16 17:33:42 366

原创 [Leetcode]Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --> 3 --> 4 --> 5Credits:Special than

2015-10-12 14:46:23 1952

原创 [Leetcode]Move Zeroes

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling you

2015-10-10 12:51:18 3401

原创 ViewServer源码分析

ViewServer源码分析

2015-10-09 16:31:25 2488 3

html5与手机游戏的未来

大致简述html5和手机游戏开发的ppt

2012-04-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除