LeetCode 35 Search Insert Position
翻譯給定一個已排序的數組和一個目標值,如果這個目標值能夠在數組中找到則返回索引。如果不能,返回它應該被插入的位置的索引。你可以假設數組中沒有重復項。以下是一些示
LeetCode 34 Search for a Range
翻譯給定一個整型已排序數組,找到一個給定值在其中的起點與終點。你的算法復雜度必須低於O(logn)。如果目標在數組中不會被發現,返回[-1, -1]。例如,給定
poj3140 Contestants Division(樹形dp)
Contestants Division Time Limit: 2000MS Memory Limit: 65536K Total Sub
[LeetCode從零單刷]Perfect Squares
題目: Given a positive integer n, find the least number of perfect square num
leetcode筆記:Construct Binary Tree from Preorder and Inorder Traversal
一. 題目描述Given preorder and inorder traversal of a tree, construct the binary tree
hdu 5587 Array 2015.11.28 bestcoder 1003
題意:一開始是一個數列1,每操作一次就復制一遍這個數列放到後面,然後在他們之間放一個0,然後從這個0開始包括0後面每一個數都+1。1——
POJ 3723 Conscription(kruskal算法求最大權森林問題)
Conscription Time Limit: 1000MS Memory Limit: 65536K Total Subm
1027. Colors in Mars (20) ——PAT (Advanced Level) Practise
題目信息1027. Colors in Mars (20)時間限制400 ms內存限制65536 kB代碼長度限制16000 BPeople in Mars r