原创 算法分析與設計課程(17):【leetcode】4Sum
Description: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target
原创 Eclipse和PyDev搭建完美Python開發環境
1.準備文件 a.下載JDK6 Java的開發包 b.下載Eclipse c.下載Python 2.x 2.安裝Jdk6 下載好後,按說明點下一步點下一步就好 3.安裝eclipse eclipse下載後,解壓就好,一般是綠色版
原创 第八章課後題答案
8.1. Optimization versus search. Recall the traveling salesman problem:TSPInput: A matrix of distances; a budget b Out
原创 算法分析與設計課程(19):【leetcode】Ugly Number II
Description: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors onl
原创 算法分析與設計課程(11):【leetcode】Gray Code
Description: The gray code is a binary numeral system where two successive values differ in only one bit. Given a no
原创 算法分析與設計課程(1):Add Two Numbers
Description: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in
原创 算法分析與設計課程(18):【leetcode】Clone Graph
Description: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbours. OJ’s undi
原创 算法分析與設計課程(16):【leetcode】 Integer to Roman
Description: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3
原创 算法分析與設計課程(9):【leetcode】Jump Game
Description: Given an array of non-negative integers, you are initially positioned at the first index of the array.
原创 算法分析與設計課程(12):【leetcode】 Count Complete Tree Nodes
Description: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikip
原创 算法分析與設計課程(5):【leetcode】Search for a Range
Description: Given an array of integers sorted in ascending order, find the starting and ending position of a given t
原创 算法分析與設計課程(4):【leetcode】Wildcard Matching
Description: Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*'
原创 算法分析與設計課程(13):【leetcode】 Product of Array Except Self
Description: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to
原创 算法分析與設計課程(14):【leetcode】 Maximal Square
Description: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return i
原创 算法分析與設計課程(10):【leetcode】Simplify Path
Description: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"pat