自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 No70. Climbing Stairs(Python)

题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive ...

2018-05-12 09:09:31 503

原创 No67. Add Binary(Python)

题目:Given two binary strings, return their sum (also a binary string).The input strings are both non-empty and contains only characters 1 or 0.Example 1:Input: a = "11", b = "1"Output: "100"Example 2:...

2018-05-04 20:33:41 383

原创 NI机试题

题目:        比如有个字符串“a(bc(de))fg",依次将括号里面的字符串进行翻转。首先,将最内层的(de)进行翻转之后得到新的字符串“a(bced)fg”,然后再将最外层括号中的字符串进行翻转后得到最终结果“adecbfg”。思路:    首先将字符串转换为list集合以方便之后的处理。这里我们需要先找到匹配的括号,然后才能对括号中的字符做相应的翻转操作。那就需要一个用来存放括号位置...

2018-05-03 17:51:47 299

原创 No47. Permutations II(Python)

题目:Given a collection of numbers that might contain duplicates, return all possible unique permutations.Example:Input: [1,1,2]Output:[ [1,1,2], [1,2,1], [2,1,1]]思路:    这道题目和上一道题目有点类似,相当于它的升级...

2018-05-02 20:15:25 479

原创 No46. Permutations 排列 (Python)

题目:Given a collection of distinct integers, return all possible permutations.Example:Input: [1,2,3]Output:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]代码:class Solution(objec...

2018-05-01 22:35:03 327

原创 N0374. Guess Number Higher or Lower(Python)

题目:We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I'll tell you whether the number is higher or ...

2018-05-01 10:21:09 813

原创 N0278. First Bad Version(Python)

题目:You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on ...

2018-04-30 22:02:44 857

原创 No35.Search Insert Position(查找插入位置)(Python)

题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array. ...

2018-04-25 22:46:51 385

原创 NO14. Longest Common Prefix (Easy) (Java)

题目:Write a function to find the longest common prefix string amongst an array of strings.编写一个函数来查找字符串数组中最长的公共前缀字符串。思路:首先,以字符串数组的第一个字符为基准,依次判断之后的字符与第一个字符公共字符的位数。取最小的位数,即公共字符串的位数。再用Substring()方法从第一个字符串中...

2018-04-12 11:29:47 177

原创 Merge Two Sorted Lists (Java)

题目:Merge 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.Example:Input: 1->2->4, 1->3->4Output: 1-&g...

2018-04-11 22:47:22 191

原创 LeetCode (Easy Part) Palindrome Number

题目:Determine whether an integer is a palindrome. Do this without extra space.确定整数是否是回文。 这样做没有额外的空间。思路:        此题是来判断一个数是否是回文数。首先,什么是回文数,下面给出回文数的定义。设n是一任意自然数。若将n的各位数字反向排列所得自然数n1与n相等,则称n为一回文数。例如,若n=1234...

2018-04-08 20:16:43 175

原创 增强现实系统的三大关键技术

三大关键问题        如何解决真实场景和虚拟物体在几何、光照和时间方面的一致性问题。几何一致性是解决虚拟对象和真实场景在空间中的一致性,这是最基本的要求。光照一致性是虚实融合场景真实感绘制的要求;时间一致性是实现实时交互的要求。        其中,几何一致性和时间一致性是研究光照一致性的前提。因为只有高效、实时恢复场景的几何表示,才能进行精确的光照恢复,才能够得到具有强烈真实感的融合效果。...

2018-04-07 10:51:15 16881 1

原创 LeetCode (Easy Part) Reverse Integer

题目:Given a 32-bit signed integer, reverse digits of an integer.给定一个32位有符号整数,整数的反转数字。Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:        Assum...

2018-04-06 11:27:22 213

原创 LeetCode (Easy Part) Valid Parentheses

问题:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.给定一个只包含字符'(',')','{','}','['和']'的字符串,确定输入字符串是否有效。The brackets must close in the...

2018-04-06 10:04:05 249

原创 LeetCode (Easy Part) Two Sum

No1. TwoSum题目:Given an array of integers, return indices of the two numbers such that they add up to a specific target.给定一个整数数组,返回这两个数字的索引,使它们合计成一个特定的目标。You may assume that each input would have exact...

2018-04-05 19:22:24 201

原创 简单工厂模式学习总结(C#)

    本人是一枚女程序“媛”,本科计算机出身,研究生转的软件,代码量屈指可数。哈哈。。。最近在看一本设计模式的书,里面的内容感觉讲的挺不错的,也就在这里随手写一些笔记,大家可以共勉,有什么不对的或者需要改进的地方欢迎各位批评指正。。。    以前本科写代码只注重运行结果,只要能够运行出来得到预期的效果就可以了。可是现在觉得能够写出来高质量的代码更加重要。高质量的代码可以从四个方面来衡量:①可维护...

2018-04-02 22:20:21 416

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除