05 2015 档案

摘要:一、问题描述 Description: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of ... 阅读全文
posted @ 2015-05-27 12:06 神奕 阅读(189) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT.不使用... 阅读全文
posted @ 2015-05-25 01:31 神奕 阅读(355) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part o... 阅读全文
posted @ 2015-05-24 23:32 神奕 阅读(132) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given an array and a value, remove all instances of that value in place and return the new length. The order of el... 阅读全文
posted @ 2015-05-24 10:42 神奕 阅读(129) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new lengt... 阅读全文
posted @ 2015-05-24 10:27 神奕 阅读(150) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of... 阅读全文
posted @ 2015-05-24 09:57 神奕 阅读(115) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a linked list, swap every two adjacent nodes and return its head. For example: Given 1->2->3->4, you shou... 阅读全文
posted @ 2015-05-24 08:55 神奕 阅读(132) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.合并 k 个有序链表。二、解题报告解法... 阅读全文
posted @ 2015-05-24 01:42 神奕 阅读(130) 评论(0) 推荐(0) 编辑
摘要:一、实习季Timeline从2015年4月开始找实习,前后历时两个月,参加了很多的笔试/面试。这是一个焦虑又美好的学期,我在这段时间里学到了很多东西。这一个学期就这么磕磕绊绊的过了一半了,决定去360实习以后,也终于能安下心来。因为等待(笔试/面试通知)真的是很痛苦的一件事。参加的... 阅读全文
posted @ 2015-05-23 14:56 神奕 阅读(168) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For exampl... 阅读全文
posted @ 2015-05-20 19:20 神奕 阅读(132) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes... 阅读全文
posted @ 2015-05-20 18:09 神奕 阅读(110) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid... 阅读全文
posted @ 2015-05-20 17:48 神奕 阅读(119) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a linked list, remove the nth node from the end of list and return its head. For example: Given linked li... 阅读全文
posted @ 2015-05-20 13:34 神奕 阅读(164) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given 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 uni... 阅读全文
posted @ 2015-05-20 12:49 神奕 阅读(129) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit ... 阅读全文
posted @ 2015-05-20 11:25 神奕 阅读(146) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Retu... 阅读全文
posted @ 2015-05-19 21:11 神奕 阅读(124) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given 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 ... 阅读全文
posted @ 2015-05-19 20:03 神奕 阅读(158) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Write a function to find the longest common prefix string amongst an array of strings.给定一组字符串,写一个函数找出它们的最长公共前缀。二、解题报告... 阅读全文
posted @ 2015-05-19 14:10 神奕 阅读(113) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.给定一个字符串表... 阅读全文
posted @ 2015-05-19 12:20 神奕 阅读(141) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.将一个整数用罗马... 阅读全文
posted @ 2015-05-19 11:46 神奕 阅读(145) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given n non-negative integers a1,a2,...,an, where each represents a point at coordinate (i,ai). n vertical lines are ... 阅读全文
posted @ 2015-05-19 10:00 神奕 阅读(149) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matche... 阅读全文
posted @ 2015-05-19 01:15 神奕 阅读(160) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Design a data structure that supports the following two operations: void addWord(word)bool search(word) search(... 阅读全文
posted @ 2015-05-16 10:12 神奕 阅读(123) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: There are a total of n courses you have to take, labeled from 0 to n−1. Some courses may have prerequisites, for e... 阅读全文
posted @ 2015-05-13 23:42 神奕 阅读(157) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Determine whether an integer is a palindrome. Do this without extra space.判断一个整数是否是回文数,不要使用额外的空间。二、解题报告解题时我们需要注意一下几点:... 阅读全文
posted @ 2015-05-13 22:53 神奕 阅读(122) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you wa... 阅读全文
posted @ 2015-05-13 22:16 神奕 阅读(149) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Reverse digits of an integer. For example: Input x = 123, return 321 Input x = -123, return -321二、解题报告本题是对一个整... 阅读全文
posted @ 2015-05-12 22:05 神奕 阅读(95) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to disp... 阅读全文
posted @ 2015-05-12 21:48 神奕 阅读(117) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, a... 阅读全文
posted @ 2015-05-12 21:22 神奕 阅读(129) 评论(0) 推荐(0) 编辑
摘要:回文串,就是指正读和反读都一样的字符串,比如"level"或者"noon"等等。那么,如何求一个字符串的最长回文子串(Longest Palindromic Substring)?这里我们有多种解法。解法一:暴力法暴力解法就是直接枚举所有子串,对每个子串判断是否为回文,时间复杂度为... 阅读全文
posted @ 2015-05-12 20:50 神奕 阅读(161) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the su... 阅读全文
posted @ 2015-05-12 12:50 神奕 阅读(138) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. T... 阅读全文
posted @ 2015-05-12 11:04 神奕 阅读(151) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given a string, find the length of the longest substring without repeating characters. For example: For "abcab... 阅读全文
posted @ 2015-05-12 00:35 神奕 阅读(109) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each... 阅读全文
posted @ 2015-05-11 22:21 神奕 阅读(120) 评论(0) 推荐(0) 编辑
摘要:一、问题描述 Description: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSu... 阅读全文
posted @ 2015-05-11 21:40 神奕 阅读(128) 评论(0) 推荐(0) 编辑
摘要:一、什么是Cache1 概念Cache,即高速缓存,是介于CPU和内存之间的高速小容量存储器。在金字塔式存储体系中它位于自顶向下的第二层,仅次于CPU寄存器。其容量远小于内存,但速度却可以接近CPU的频率。当CPU发出内存访问请求时,会先查看 Cache 内是否有请求数据。如果存在... 阅读全文
posted @ 2015-05-09 15:17 神奕 阅读(439) 评论(0) 推荐(0) 编辑
摘要:一、问题描述Description:Implement a trie with insert, search, and startsWith methods.Note: You may assume that all inputs are consist of lowercase ... 阅读全文
posted @ 2015-05-09 02:14 神奕 阅读(145) 评论(0) 推荐(0) 编辑
摘要:本文用尽量简洁的语言介绍一种树形数据结构 —— Trie树。一、什么是Trie树Trie树,又叫字典树、前缀树(Prefix Tree)、单词查找树 或 键树,是一种多叉树结构。如下图: 上图是一棵Trie树,表示了关键字集合{“a”, “to”, “tea”, “ted”, “... 阅读全文
posted @ 2015-05-09 01:49 神奕 阅读(1256) 评论(0) 推荐(0) 编辑
摘要:一、问题描述Description:There are a total of n courses you have to take, labeled from 0 to n−1.Some courses may have prerequisites(前提), for example... 阅读全文
posted @ 2015-05-07 02:24 神奕 阅读(170) 评论(0) 推荐(0) 编辑
摘要:一、什么是拓扑排序在图论中,拓扑排序(Topological Sorting)是一个有向无环图(DAG, Directed Acyclic Graph)的所有顶点的线性序列。且该序列必须满足下面两个条件:每个顶点出现且只出现一次。若存在一条从顶点 A 到顶点 B 的路径,那么在序列... 阅读全文
posted @ 2015-05-07 01:56 神奕 阅读(342) 评论(0) 推荐(1) 编辑
摘要:一、问题描述Description:Reverse a singly linked list.Hint: A linked list can be reversed either iteratively or recursively. Could you implement bot... 阅读全文
posted @ 2015-05-05 09:13 神奕 阅读(108) 评论(0) 推荐(0) 编辑
摘要:一直都对公钥和私钥的概念不清不楚,以至于在 腾讯面试 被问到“如何在一个不安全的环境中实现安全的数据通信?”时,并没有答上来。今天查阅了一些资料,决定写一篇总结文章来加深自己的理解。一、公钥算法与私钥算法1、私钥算法私钥加密算法,又称 对称加密算法,因为这种算法解密密钥和加密密钥是... 阅读全文
posted @ 2015-05-02 12:43 神奕 阅读(660) 评论(0) 推荐(0) 编辑
摘要:一、字节序字节序,也就是字节的顺序,指的是多字节的数据在内存中的存放顺序。在几乎所有的机器上,多字节对象都被存储为连续的字节序列。例如:如果C/C++中的一个int型变量 a 的起始地址是&a = 0x100,那么 a 的四个字节将被存储在存储器的0x100, 0x101, 0x... 阅读全文
posted @ 2015-05-01 21:11 神奕 阅读(323) 评论(0) 推荐(0) 编辑

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