该文被密码保护。 阅读全文
posted @ 2016-04-26 01:02 Juntaran 阅读(20) 评论(0) 推荐(0) 编辑
摘要: Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would 阅读全文
posted @ 2016-04-25 00:49 Juntaran 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Nim Game You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 阅读全文
posted @ 2016-04-24 23:18 Juntaran 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Move Zeros 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 e 阅读全文
posted @ 2016-04-24 23:17 Juntaran 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Ugly Number Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3 阅读全文
posted @ 2016-04-24 23:16 Juntaran 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find 阅读全文
posted @ 2016-04-24 23:15 Juntaran 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the proce 阅读全文
posted @ 2016-04-24 23:14 Juntaran 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the 阅读全文
posted @ 2016-04-24 23:13 Juntaran 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Invert Binary Tree Invert a binary tree. to 阅读全文
posted @ 2016-04-24 23:12 Juntaran 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Remove Linked List Elements Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 阅读全文
posted @ 2016-04-24 23:11 Juntaran 阅读(150) 评论(0) 推荐(0) 编辑