- 博客(21)
- 资源 (1)
- 问答 (5)
- 收藏
- 关注
原创 Maximum_Product_of_Word_Lengths
题目描述:Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower ca
2017-09-29 20:58:31 171
原创 Single_Number_III
题目描述:Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice.Find the two elements that appear only once.For example:
2017-09-22 22:01:20 160
原创 Single_Number_II
题目描述: Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one. Note: Your algorithm should have a linear runtime co
2017-09-21 12:26:46 143
原创 Single_Number
题目描述: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement i
2017-09-21 12:23:57 145
原创 Repeated_DNA_Sequences
题目描述: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within t
2017-09-19 14:59:57 267
原创 Integer_Replacement
题目描述: Given a positive integer n and you can do operations as follow: If n is even, replace n with n/2. If n is odd, you can replace n with either n + 1 or n - 1. What is the minim
2017-09-18 19:13:41 399
原创 Subsets位运算版
题目描述:Given a set of distinct integers, S, return all possible subsets.Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets.
2017-09-18 12:39:03 588
原创 Bitwise_AND_of_Numbers_Range
题目描述: Given a range [m, n] where 0 return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 7], you should return 4. (求m和n二进制编码中,相同的前缀 .)思路:将两个数同时向右移
2017-09-18 12:34:50 346
原创 Number_of_Longest_Increasing_Subsequence
题目描述:Given an unsorted array of integers, find the number of longest increasing subsequence.Example 1:Input: [1,3,5,4,7]Output: 2Explanation: The two longest increasing subsequence are [1,
2017-09-15 19:16:15 345
原创 Add_and_Search_Word_Data_structure_design
题目描述: Design a data structure that supports the following two operations: void addWord(word) bool search(word)search(word) can search a literal word or a regular expression string contain
2017-09-12 11:28:47 270
原创 Implement_Trie_(Prefix_Tree)
题目描述:Implement a trie(单词查找树:利用字符串的公共前缀来节约存储空间) with insert, search, and startsWith methods.Note: You may assume that all inputs are consist of lowercase letters a-z.思路:全在注释里。public class Im
2017-09-11 12:24:40 332
原创 机器人AI的制作
在游戏里,NPC的智能程度将直接影响到游戏的质量,那么我们就来看一个在距离主角很近的时候会跑来攻击主角的巡逻机器人的制作。public class MonsterAi : MonoBehaviour { //主角 private GameObject Capsule; //机器人状态 public const int STAND = 0; public const int WALK
2017-09-09 12:00:43 2006
原创 Unique_Paths_II
题目描述: Follow up for "Unique Paths": Now consider if some obstacles(障碍) are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 r
2017-09-08 16:30:37 273
原创 Unique_Paths
题目描述: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying
2017-09-08 16:28:11 331
原创 Combination_Sum_II
题目描述: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the
2017-09-07 12:03:34 235
原创 Combination_Sum
题目描述: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may b
2017-09-07 11:16:57 282
原创 小地图的制作
小地图对于现在的游戏来讲可以说非常普遍,玩家可以通过小地图来了解人物现在的位置以及地形信息,下面我们先看一个简易的效果图:制作小地图有一个要注意的点,GUI屏幕坐标和世界坐标的转化:上面我画了两张图,比较难看,但是还是解释了转化的原理,世界坐标和屏幕坐标的x和z均相差了一半地图长度,说直白点,把世界坐标向左和向下移一半就是屏幕坐标。但得到的坐标如果直接赋给小地图上的
2017-09-06 18:50:26 448
原创 Unity3D 5.6无法新建项目
unity5.6版本有时候会出现无法新建项目的情况,点击new没有任何反应,只有永远消失不了的进度条。其实解决的方法也特别简单:只需要退出重新登陆即可。这样就可以重新新建项目了。
2017-09-05 09:31:58 7795
原创 Palindrome_Partitioning
题目描述:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.(给定一个字符串S,将s划分为每个子串是回文。返回所有可能的回文划分S.)For example, g
2017-09-04 16:51:43 282
转载 关于博弈论基础知识的一些总结
文章PDF文档:http://pan.baidu.com/share/link?shareid=163007845&uk=1913509805博弈论是二人或多人在平等的对局中各自利用对方的策略变换自己的对抗策略,达到取胜目标的理论。基础的基础a) 当前执行者想赢。这个是必要的,有时候题目中判别胜负的条件会与平时练习的恰好相反,此时你就应该按照题目要求思考,即在经典模型中思考
2017-09-04 10:35:20 722
原创 Unique_Substrings_in_Wraparound_Strin
题目描述: Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....".
2017-09-03 18:39:37 227
空空如也
unity 3D 游戏里小地图制作的问题
2017-05-24
线程同步 卖票问题 三个车站卖七张票
2016-05-23
线程同步 卖票问题 三个车站卖七张票
2016-05-19
蓝桥杯振兴中华c++代码
2016-04-19
蓝桥杯 未名湖的烦恼 fun(m-1,n)+fun(m,n-1)这句代码详细解释
2016-02-01
TA创建的收藏夹 TA关注的收藏夹
TA关注的人