- 博客(13)
- 资源 (4)
- 收藏
- 关注
原创 Contains Duplicate
given an array of integers, find if the array contains any duplicates.your function should return true if any value appears at least twice in the array, and it should return false if every eleme
2016-08-29 00:40:00 433
原创 Majority Element
Given an array of size n, find the majority element.The majority element is the element that appears more than ⌊ n / 2 ⌋ times.You may assume that the array is non - empty and the majority element
2016-08-26 23:15:55 459
原创 Valid Anagram
Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.bool isAnagram(cha
2016-08-25 00:26:15 272
原创 Excel Sheet Column Number
Excel Sheet Column NumberGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA
2016-08-24 23:48:13 314
原创 Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the
2016-08-23 23:41:23 242
原创 substring
求a是否是b的字串问题bool substring(char* ransomNote, char* magazine) { int rnum=strlen(ransomNote); int mnum=strlen(magazine); if(rnum>mnum) return false; else { char* cur
2016-08-23 23:21:55 266
原创 ransomNote
Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constru
2016-08-23 23:20:18 290
原创 ubuntu出现您的当前网络有.local域
首先终端下执行:sudo gedit /etc/default/avahi-daemon然后设置参数AVAHI_DAEMON_DETECT_LOCAL=0即可。reference:http://blog.csdn.net/djd1234567/article/details/50505140
2016-08-23 13:26:22 3442
原创 Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with val
2016-08-22 16:14:43 419
原创 addDigits
/*Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only o
2016-08-22 16:07:01 455
原创 ubuntu下python+theano+keras深度学习环境搭建
一、python安装对于ubuntu,python一般是自带的,安装好的,可以再终端输入“python --version”进行查询对应的python的版本号。二 python对应深度学习库安装首先sudo apt-get update进行更新。其次sudo apt-get install python-numpy python-scipy python-dev python-
2016-08-22 15:58:12 2490
原创 安装ubuntu以及安装一些必要的软件
一 Ubuntu安装我安装的是双系统,本机已经装好的win7,再安装ubuntu一定要看清楚自己win7是以何种方式安装的,这点要非常注意。Win7的正规安装方式有4种,ubuntu的正规安装方式也是这4种:(双系统理论上提供4*4种正规安装方式)A、BIOS+MBR 传统安装方式B、CSM+MBR 注:CSM是指UEFI主板,且开启CSM,这种办法就感觉UEFI不存在一样
2016-08-22 15:48:14 820
转载 ubuntu安装chrome
ubuntu 公司估计和Google公司有些许不同意见,我们使用apt-get,还是图形软件中心都无法找到Chrome浏览器。对于这种情况,我们生可以忍,熟不能忍。下面简述安装方法:大部分的教程都是如此:一、通过直接下载安装Google Chrome浏览器deb包。打开Ubuntu终端,以下为32位版本,使用下面的命令。wget https://dl.goo
2016-08-18 18:19:53 730
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人