Intersection of Two Linked Lists
題目:Write a program to find the node at which the intersection of two singly link
poj 3990 Fermat Point in Quadrangle 凸包和費馬點
題意:求一個四邊形的費馬點。分析:模擬退火要麼超時要麼wa,這題的數據就是不想讓隨機算法過的。。其實四邊形的費馬點很簡單,如果是凸四邊形的話費馬點是對角線交點,
hdu 1788 Chinese remainder theorem again 最小公倍數
Chinese remainder theorem againTime Limit: 1000/1000 MS (Java/Others) Memory Lim
HDOJ題目3309 Roll The Cube(BFS)
Roll The CubeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K
POJ 3126 Prime Path(BFS 數字處理)
題意 給你兩個4位素數a, b 你每次可以改變a的一位數但要求改變後仍為素數 求a至少改變多少次才能變成b基礎的bfs 注意數的處理就行了 出隊一個數 然後入隊
[LeetCode] Merge Two Sorted Lists
Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list.
leetcode || 56、 Merge Intervals
problem: Given a collection of intervals, merge all overlapping intervals.F
leetcode || Spiral Matrix
problem: Given a matrix of m x n elements (m rows, n columns), return all e
POJ3252 Round Numbers 組合數學||數位DP
題型是數位DP中很常見的,給一個區間[l,r]求區間[l,r]中的 符合題目要求的數的個數,本題求的 是 區間中 的數 它的二進制中0的個數大於等於
leetcode_num179_Insertion Sort list
Sort a linked list using insertion sort.舉例子真是寫對代碼的好方法! /** * Definition for