10 2015 档案

摘要:1. 顶层const表示指针本身是个常量,而底层const表示指针所指向的对象是一个常量,顶层const可以适用于任何数据类型,而底层const只能用于指针和引用等符合类型;2. 声明constexpr类型时由编译器来验证变量是否是一个常量表达式,constexpr定义了一个常量,只能由字面值类型来... 阅读全文
posted @ 2015-10-30 20:40 skycore 阅读(139) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. ... 阅读全文
posted @ 2015-10-28 19:33 skycore 阅读(124) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->N... 阅读全文
posted @ 2015-10-27 23:33 skycore 阅读(148) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Give... 阅读全文
posted @ 2015-10-26 17:52 skycore 阅读(156) 评论(0) 推荐(0) 编辑
摘要:具体描述见《统计学习方法》第三章。 1 // 2 // main.cpp 3 // kNN 4 // 5 // Created by feng on 15/10/24. 6 // Copyright © 2015年 ttcn. All rights reserved. 7 //... 阅读全文
posted @ 2015-10-25 15:46 skycore 阅读(236) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -... 阅读全文
posted @ 2015-10-23 23:17 skycore 阅读(106) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3... 阅读全文
posted @ 2015-10-22 23:19 skycore 阅读(124) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve ... 阅读全文
posted @ 2015-10-22 23:06 skycore 阅读(137) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume tha... 阅读全文
posted @ 2015-10-21 11:26 skycore 阅读(137) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the fa... 阅读全文
posted @ 2015-10-21 10:54 skycore 阅读(127) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Reverse a singly linked list.解题思路:链表真讨厌,总是出错。头插法。 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 *... 阅读全文
posted @ 2015-10-20 23:30 skycore 阅读(120) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5... 阅读全文
posted @ 2015-10-20 22:59 skycore 阅读(118) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接):Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For examp... 阅读全文
posted @ 2015-10-18 17:11 skycore 阅读(112) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the follow... 阅读全文
posted @ 2015-10-17 23:51 skycore 阅读(119) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it c... 阅读全文
posted @ 2015-10-17 22:50 skycore 阅读(133) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra ... 阅读全文
posted @ 2015-10-15 23:41 skycore 阅读(141) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)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 @ 2015-10-15 11:23 skycore 阅读(107) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the tot... 阅读全文
posted @ 2015-10-14 23:10 skycore 阅读(128) 评论(0) 推荐(0) 编辑
摘要:题目链接:(链接)You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can ... 阅读全文
posted @ 2015-10-12 17:53 skycore 阅读(147) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant di... 阅读全文
posted @ 2015-10-12 17:28 skycore 阅读(97) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?解题思路:先将矩阵选... 阅读全文
posted @ 2015-10-11 22:11 skycore 阅读(142) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given apatternand a stringstr, find ifstrfollows the same pattern.Herefollowmeans a full match, such that there is a bijection between a lett... 阅读全文
posted @ 2015-10-11 13:20 skycore 阅读(183) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after r... 阅读全文
posted @ 2015-10-11 10:45 skycore 阅读(126) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are fil... 阅读全文
posted @ 2015-10-08 22:34 skycore 阅读(141) 评论(0) 推荐(0) 编辑
摘要:原文地址:http://download.csdn.net/download/fjp1230123/9138833 跟随iOS开发技术发展的潮流,我将持续维护本文档的中文版,如果你喜欢这个译本,也请给个 Star 鼓励下~~本文档的 "英文原版在这里" ,感谢 "Futurice" 团队卓越的工作... 阅读全文
posted @ 2015-10-08 17:34 skycore 阅读(419) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following seq... 阅读全文
posted @ 2015-10-07 15:23 skycore 阅读(129) 评论(0) 推荐(0) 编辑
摘要:以前看《C++ Primer》就看到过函数的可变参数列表,但是书中只是一带而过,具体用法没有介绍。现在把“圣经”看了一遍,以前的很多疑问都烟消云散。可变参数的使用主要用到标准头文件中定义一组宏定义,它们对如何遍历参数表进行了定义。其中:va_list类型声明一个变量(如ap),该变量将依次引用各参数... 阅读全文
posted @ 2015-10-04 20:38 skycore 阅读(485) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is no... 阅读全文
posted @ 2015-10-04 20:14 skycore 阅读(159) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It do... 阅读全文
posted @ 2015-10-03 14:00 skycore 阅读(103) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives th... 阅读全文
posted @ 2015-10-03 13:29 skycore 阅读(135) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three intege... 阅读全文
posted @ 2015-10-03 11:31 skycore 阅读(127) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.No... 阅读全文
posted @ 2015-10-03 11:14 skycore 阅读(135) 评论(0) 推荐(0) 编辑
摘要:题目描述:(链接)Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The... 阅读全文
posted @ 2015-10-02 21:04 skycore 阅读(143) 评论(0) 推荐(0) 编辑
摘要:题目描述:(题目链接)There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time comple... 阅读全文
posted @ 2015-10-02 17:38 skycore 阅读(184) 评论(0) 推荐(0) 编辑
摘要:第一次读这本书的时候是大三初,现在打算重读一遍!。第一章 导言1. 学习一门新程序设计语言的唯一途径就是用它来写程序。2. 每个程序都从main函数的起点开始执行。3. 在C语言中,所有变量必须先声明后使用。4. C语言中的基本数据类型的大小取决于具体机器。5. 在允许使用某种类型变量值的任何场合,... 阅读全文
posted @ 2015-10-02 16:33 skycore 阅读(455) 评论(0) 推荐(0) 编辑
摘要:忘记了出处,侵删!!!#阿里一面1.Android的activity2.Category支持添加属性与成员变量吗3.是否了解设计模式, 用过哪些4.iOS7之后, 蓝牙的围栏功能5.MVC是否了解?介绍下使用情况。6.MVC里面, View怎么通知到Model7.了解delegate吗?并介绍8.说... 阅读全文
posted @ 2015-10-02 13:20 skycore 阅读(648) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示