摘要: 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 阅读全文
posted @ 2015-07-29 16:43 鸭子船长 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr... 阅读全文
posted @ 2015-07-29 16:17 鸭子船长 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integerk, find out whether there there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and the d... 阅读全文
posted @ 2015-07-29 16:13 鸭子船长 阅读(144) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should... 阅读全文
posted @ 2015-07-29 15:40 鸭子船长 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 转自http://blog.sina.com.cn/s/blog_9f1c0931010180cy.html Vectors vector是C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。vector之所以被认为是一个容器,是因为它能够像容器一样存放各种类 阅读全文
posted @ 2015-07-29 14:56 鸭子船长 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-07-29 10:39 鸭子船长 阅读(168) 评论(0) 推荐(0) 编辑
摘要: A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you aregiven... 阅读全文
posted @ 2015-07-29 00:42 鸭子船长 阅读(178) 评论(0) 推荐(0) 编辑