原创 Leetcode之Substring with Concatenation of All Words

題目如下:You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indic

原创 Leetcode之Remove Duplicate Letters

題目描述如下: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear on

原创 Leetcode之Implement strStr()

Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of h

原创 Leetcode之Jump Game & Jump Game II

Jump Game題目描述如下: Given an array of non-negative integers, you are initially positioned at the first index of the arra

原创 Leetcode之Combination SumII

與Combination Sum不同之處在candidates數組中的元素最多隻能用一次,且結果集必須不含有重複元素,方法爲: 當前元素跟前一個元素是相同的時候,如果前一個元素被取了,那當前元素可以被取,也可以不取,反過來如果前一個元素沒

原创 徹底理解webservice SOAP WSDL

轉自http://blog.csdn.net/zhuizhuziwo/article/details/8153327 WebServices簡介 先給出一個概念 SOA ,即Service Oriented Architecture

原创 Python xrange與range

轉自http://www.nowamagic.net/academy/detail/1302446 range 前面小節已經說明了,range([start,] stop[, step]),根據start與stop指定的範圍以及

原创 數據結構之“堆”

轉載自http://www.cnblogs.com/Jason-Damon/archive/2012/04/18/2454649.html 1.堆     堆數據結構是一種數組對象,它可以被視爲一科完全二叉樹結構。它的特點是父節點

原创 Linux cgroup控制進程資源

通過cgroup控制進程資源使用時,遇到 /bin/echo 4153554 > tasks  /bin/echo: write error: No space left on device 解決方法:開始時只寫入了cpuset.cpus

原创 java 堆棧的區別

轉自http://blog.csdn.net/chengyingzhilian/article/details/7781858 Java把內存分成兩種,一種叫做棧內存,一種叫做堆內存 在函數中定義的一些基本類型的變量和對象的引用變

原创 Leetcode之Basic Calculator & Basic Calculator II

相對而言,Basic Calculator II更簡單一點,所以我們先從Basic Calculator II開始。 Implement a basic calculator to evaluate a simple expressi

原创 HTCondor python bindings使用

因爲想通過web提交condor作業,所以先看了看提供的python接口,python接口中提交作業時使用的是classad,而不是submit file,對於屬性的定義寫法會不太一樣。一開始在自己瞎折騰,後來才發現可以使用condor_

原创 leetcode之Repeated DNA Sequences

轉自http://blog.csdn.net/xudli/article/details/43666725 Total Accepted: 1161 Total Submissions: 6887 All DNA is c

原创 幾種排序算法分析及python實現

這兩天參加筆試題發現排序的東西還是蠻多的,藉此機會總結一下~ 排序算法的穩定性: 排序前2個相等的數其在序列的前後位置順序和排序後它們兩個的前後位置順序相同。即如果Ai = Aj, Ai原來在位置前,排序後Ai還是要在Aj位置前。 快速

原创 Leetcode之Intersection of Two Linked Lists

給定兩個鏈表,找出交集點,要求時間複雜度是O(n)、空間複雜度爲O(1) 暴力破解:遍歷鏈表A的所有節點,並且對於每個節點,都與鏈表B中的所有節點比較,退出條件是在B中找到第一個相等的節點。時間複雜度爲O(lengthA * leng