
算法
文章平均质量分 82
贪睡的萝卜
这个作者很懒,什么都没留下…
展开
-
Valid Sudoku
QuestionDetermine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A par原创 2015-07-13 17:43:52 · 512 阅读 · 0 评论 -
Amusing Digits(2015网易游戏笔试题)
Question时间限制:10000ms单点时限:1000ms内存限制:256MB描述网易成立于1997年6月,是中国领先的互联网技术公司。其相继推出了门户网站、在线游戏、电子邮箱、在线教育、电子商务等多种服务,目标是利用最先进的互联网技术,加强人与人之间信息的交流和共享,实现“网聚人的力量”。网易在线游戏是网易公司的一个重要组成部分,在开发原创 2015-09-15 23:55:04 · 1526 阅读 · 2 评论 -
Best Compression Algorithms(网易游戏2015笔试题)
Question时间限制:10000ms单点时限:1000ms内存限制:256MB描述易信是由网易和电信联合开发的一款即时通讯软件。除了语音聊天,免费电话等新功能以外,传统的文字信息聊天功能也得以保留,因此每天都有大量的文字信息需要在服务器中存储,中转。小Y是一名负责处理文字信息的易信工程师,每天他都要和字符串打交道。为了提高存储和传原创 2015-09-15 23:57:08 · 875 阅读 · 0 评论 -
Word Break
QuestionGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",原创 2015-09-04 22:34:56 · 455 阅读 · 0 评论 -
Word Break II
QuestionGiven a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example原创 2015-09-04 23:12:17 · 523 阅读 · 0 评论 -
Kth Smallest Element in a BST
QuestionGiven a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST's total elements.Follow up原创 2015-09-04 21:30:38 · 395 阅读 · 0 评论 -
Sqrt(x)
QuestionImplement int sqrt(int x).Compute and return the square root of x.My Solutionclass Solution {public: int mySqrt(int x) { /** * binary search a from [0, x], where a^2 = x.原创 2015-08-01 20:58:21 · 2951 阅读 · 0 评论 -
Decode Ways
QuestionA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determin原创 2015-07-15 11:20:41 · 670 阅读 · 0 评论 -
Merge Two Sorted Lists
QuestionMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.My Solution/** * Definition for singly-l原创 2015-07-14 22:28:47 · 465 阅读 · 0 评论 -
Two Sum
QuestionGiven 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 numbers such that they add up to the原创 2015-07-13 22:32:48 · 548 阅读 · 0 评论 -
Difficult Player Grouping(2015网易游戏笔试题)
Question时间限制:20000ms单点时限:2000ms内存限制:256MB描述Battle to the West (乱斗西游) is a MOBA(multiplayer online battle arena) mobile game developed by Netease Games. It has grown fast原创 2015-09-15 23:47:17 · 736 阅读 · 0 评论