2015年11月16日
摘要:
题目:Given an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate number must exist. Ass...
阅读全文
posted @ 2015-11-16 10:29
已停更
阅读(174)
推荐(0)
2015年11月13日
摘要:
题目:单链表逆置,必须掌握Reverse a singly linked list.click to show more hints.Hint:A linked list can be reversed either iteratively or recursively. Could you imp...
阅读全文
posted @ 2015-11-13 10:53
已停更
阅读(204)
推荐(0)
2015年11月12日
摘要:
c++ primer 2 变量和基本类型
阅读全文
posted @ 2015-11-12 16:32
已停更
阅读(402)
推荐(0)
摘要:
题目:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime c...
阅读全文
posted @ 2015-11-12 13:58
已停更
阅读(145)
推荐(0)
摘要:
题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.解析:这题没兴趣做,抄答案http://blog.csdn.net/jellyyi...
阅读全文
posted @ 2015-11-12 10:29
已停更
阅读(187)
推荐(0)
摘要:
题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in...
阅读全文
posted @ 2015-11-12 09:27
已停更
阅读(154)
推荐(0)
2015年11月11日
摘要:
题目:Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 ...
阅读全文
posted @ 2015-11-11 15:20
已停更
阅读(159)
推荐(0)
摘要:
题目:Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. ...
阅读全文
posted @ 2015-11-11 14:02
已停更
阅读(167)
推荐(0)
2015年11月10日
摘要:
题目:Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next poi...
阅读全文
posted @ 2015-11-10 15:25
已停更
阅读(190)
推荐(0)
摘要:
题目:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?解析: 1 class Solution { 2 public: 3 ...
阅读全文
posted @ 2015-11-10 11:24
已停更
阅读(155)
推荐(0)