- 博客(18)
- 资源 (9)
- 收藏
- 关注
原创 [leetcode][201]. Bitwise AND of Numbers Range
Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4.import mathclass Solution(object): def rangeBitwiseAnd(self, m, n): """ :type m: in
2016-12-31 10:34:40 358
原创 [leetcode][350] Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as ma
2016-12-30 22:52:33 371
原创 [leetcode][171] Excel Sheet Column Number
Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ...
2016-12-30 14:18:16 297
原创 [leetcode][231] Power of Two
Given an integer, write a function to determine if it is a power of two.class Solution(object): def isPowerOfTwo(self, n): """ :type n: int :rtype: bool
2016-12-29 23:14:55 318
原创 [leetcode][18]4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: The solution
2016-12-29 23:06:13 321
原创 [leetcode][384]. Shuffle an Array
Shuffle a set of numbers without duplicates.Example:// Init an array with set 1, 2, and 3.int[] nums = {1,2,3};Solution solution = new Solution(nums);// Shuffle the array [1,2,3] and return
2016-12-29 17:18:04 336
原创 [leetcode][108]. Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):#
2016-12-29 10:09:37 283
原创 [leetcode][187]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 the DNA.Wri
2016-12-28 21:54:08 350
原创 [leetcode][155] Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get
2016-12-28 02:50:52 375
原创 [leetcode][67] Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".class Solution(object): def addBinary(self, a, b): """ :
2016-12-28 02:19:37 329
原创 [leetcode][83]Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.# Definition for si
2016-12-28 02:14:30 271
原创 [leetcode][98] Validate Binary Search Tree
没睡着,来做题。Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than
2016-12-28 02:08:07 293
原创 [leetcode][125]Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a
2016-12-27 22:29:52 318
原创 [leetcode][401]. Binary Watch
下课了,做道简单题。A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59).Each LED represents a zero or one, with the least sig
2016-12-27 21:38:06 318
原创 temp images
1 9 The markdown editor is too ugly to use. But hosting images is right for it. ipv6-reset.batipconfig /release6ipconfig /renew6
2016-12-24 02:01:22 826
原创 [CompStat][计算统计][0]sharpen your tools
IPython (交互式python命令行工具)是一种增强型python shell软件。 它给用户提供了更具鲁棒性和效率性的开发环境。其中,它的几个关键特性与标准python shell不同。命令历史ipython中,你所有的输入输出都会被保存(这比标准python shell高级多了)。它提供了两个变量In和Out分别存储你的输入输出。 所有输出自动保存到变量_N 其中N为输出cell的序号。
2016-12-22 17:01:10 1020
原创 [visualization]nextworkx_example - graphic data visualization
利用networkx创建图数据,并进行可视化的例子。
2016-12-10 01:38:39 1047
原创 examples - visualizing time series data and geographic data using python
利用cartopy和pandas处理时间序列数据和地理数据。pandas中介绍了处理日期的函数pandas.to_datetime, groupby 的使用。cartopy初步介绍了画地理信息图的方法。地理信息GIS专业的同学可能用到。
2016-12-09 16:08:03 1708 2
A simple adaptive first-order differential microphone.pd
2018-04-08
email data for naive bayes filter
2017-01-15
Ian Goodfellow introduction to GANs ( Generative Adversarial Networks)
2016-12-09
HangMan 猜单词 一个简易的吊死鬼游戏 python版
2016-03-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人