- 博客(61)
- 收藏
- 关注
转载 谷歌2013校招笔试题
1、单项选择题1.1 如果把传输速率定义为单位时间内传送的信息量(以字节计算)多少。关于一下几种典型的数据传输速率:1.使用USB2.0闪存盘,往USB闪存盘上拷贝文件的数据传输速率2.使用100M以太网,在局域网内拷贝大文件时网络上的数据传输速率3.使用一辆卡车拉1000块单块1TB装满数据的硬盘,以100km/h的速度从上海到天津(100km)一趟所等价的数据传输带宽4.使
2014-08-04 07:27:50
512
原创 最小生成树 prim算法和kruskal算法
最小生成树假设在n个城市中要建立通信网络,那么连接n个点需要n-1条边。任意两个城市间建立通信网络都是需要费用的,这个可以认为是边的权值,用来表示响应的代价。对于n个顶点的连通图可以构建不同的生成树,而这个代价最小的生成树称为最小生成树。最小生成树的MST特性,假设N = (V,{E})是一个连通网,U是顶点集V的一个非空子集。若(u,v)是一条具有最小权值的边,其中u属于U,v属于V-U
2014-07-08 23:50:36
657
原创 Implement strStr()
Implement strStr()Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.
2014-06-18 10:57:09
485
原创 Remove Element
Remove ElementGiven 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 doesn't matter what you leave beyond th
2014-06-18 10:02:14
477
原创 Remove Duplicates from Sorted Array
Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for anoth
2014-06-18 09:40:09
614
原创 Reverse Nodes in k-Group
Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in th
2014-06-17 18:49:21
531
原创 Swap Nodes in Pairs
Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use o
2014-06-17 18:22:24
541
转载 Merge k Sorted Lists
Merge k Sorted ListsMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
2014-06-17 17:28:47
547
原创 Valid Parentheses
Valid ParenthesesGiven a string containing just the characters '(', ')','{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "
2014-06-08 23:23:42
478
原创 Remove Nth Node From End of List
Remove Nth Node From End of ListGiven 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 removi
2014-06-08 23:11:27
449
原创 Letter Combinations of a Phone Number
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone but
2014-06-08 22:51:57
544
原创 4Sum
4SumGiven an array S of n integers, are there elements a,b, c, and d in S such that a + b +c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:
2014-06-08 22:46:51
448
原创 3Sum Closest
3Sum ClosestGiven an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input
2014-06-08 22:41:52
767
原创 3Sum
3SumGiven an array S of n integers, are there elements a,b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet
2014-06-08 12:12:06
489
原创 Longest Common Prefix
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.遍历
2014-06-08 11:54:43
449
原创 Roman to Integer
Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.
2014-06-08 11:49:24
447
原创 操作系统学习总结二
1.内存池,进程池,线程池内存池是一种内存的分配方式,程序中通过new,malloc去申请,因为申请的内存大小不同,所以会产生内存碎片,而且如果申请过于频繁,内存的创建回收也是一笔开销。内存池是在实际的内存使用之前,先申请一部分内存,通常情况下申请的内存块大小相等。在程序中需要用到内存时,先去内存池中申请,用完后再将申请后的那部分内存标记为可用。而不是真的去创建释放内存,只是一个内存标识而
2014-06-05 22:11:04
543
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人