摘要: 前言: 一年前在知乎上看到一个回答,答主说自己学了两天Python,用十几个小时做完了全部的编译原理课程作业,当时吓傻了我,现在看来,虽然两天学会比不上,但Python做课程作业的速度简直是快,课程作业1里我还傻傻的用list的extend和append,加上set函数,到第二次作业里我才发现, 没 阅读全文
posted @ 2016-04-04 21:21 Dystopia 阅读(2657) 评论(0) 推荐(0) 编辑
摘要: 4/4 这周莫名得忙,一天是做编译,一天是做模式识别作业,(一天刷魔兽皮肤),周末玩了两天,总的来说还是松懈了,大概只做了两天的leetcode,刷了10道题,羞愧羞愧。 决定每次把代码附上在这个总结里,一来是方便,二来是有利于以后回顾。(其实想找一个更好的排列方法,以后再说吧) 283. Move 阅读全文
posted @ 2016-04-04 21:05 Dystopia 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 3/27 胡乱投了一堆简历,做了七牛的笔试,看了腾讯的面试题 感觉不懂的还是很多啊,不过也知道了笔试套路其实也不多,基本算法/数据结构(不会太难)、c/c++基础(后面的知识类似虚函数需要了解)、linux及多线程、网络和HTTP、数据库 这周本来想做完华为的精英赛题,感觉很有把握的,结果电脑联网报 阅读全文
posted @ 2016-03-27 12:14 Dystopia 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime complex 阅读全文
posted @ 2016-03-23 19:14 Dystopia 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit 阅读全文
posted @ 2016-03-23 18:13 Dystopia 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2016-03-23 18:12 Dystopia 阅读(328) 评论(0) 推荐(0) 编辑
摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2016-03-23 15:02 Dystopia 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 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 ston 阅读全文
posted @ 2016-03-23 13:19 Dystopia 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 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 ex 阅读全文
posted @ 2016-03-23 13:17 Dystopia 阅读(202) 评论(0) 推荐(0) 编辑