原创 LeetCode Merge Two Sorted Lists(合併兩個有序鏈表)

題目鏈接 <pre name="code" class="cpp">struct ListNode *MergeSortList(struct ListNode *head1, struct ListNode *head2) { st

原创 DSOJ Level-order sequence with degree(森林的帶度數層次遍歷序列)

題目鏈接 #include<stdio.h> //Level-order sequence with degree(森林的帶度數層次序列存儲) #include<string.h> #include<stdlib.h> //算法

原创 DSOJ Heapsort implementation(堆排序)

題目鏈接 #include<stdio.h> //HeapSort implementation #include<string.h> #include<stdlib.h> #define MAXLEN 100001 int len

原创 DSOJ Multiplication of large integer(大數乘法)

題目鏈接 #include<stdio.h> //大整數相乘(輸入爲兩個不超過200位的非負整數,無前導0,要求輸出也無前導0) #include<string.h> //算法思想:類似於筆算整數的乘法,分別用一個乘數的各位數乘

原创 HackerRank Find Median(中位數)

題目鏈接 Problem Statement The median of a finite list of numbers can be found by arranging all the integers from lowes

原创 MIT_線性代數筆記_01_方程組的幾何解釋

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 1: The geometry of linear equations 課程 1:方程組的幾何解釋 首先考慮最簡單的二元線性方程組 {a1x

原创 MIT_線性代數筆記_02_矩陣消元

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 2: Elimination with matrices 課程 2:矩陣消元 對於線性方程組 ⎧⎩⎨x+2y+z3x+8y+z4y+z=2=

原创 MIT_線性代數筆記_07_求解Ax=0:主變量、特解

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 7: Solving Ax = 0: pivot variables, special solutions 課程 7:求解Ax=0:主變量、特解

原创 MIT_線性代數筆記_11_矩陣空間、秩1矩陣、小世界圖

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 11: Matrix spaces; rank 1; small world graphs 課程 11:矩陣空間、秩1矩陣、小世界圖 矩陣空間

原创 MIT_線性代數筆記_08_求解Ax=b:簡化行階梯形式R

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 8: Solving Ax = b: row reduced form R 課程 8:求解 Ax=b:簡化行階梯形式 R 這一講的主要內容是求

原创 MIT_線性代數筆記_10_四個基本子空間

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 10: The four fundamental subspaces 課程 10:四個基本子空間 四個基本子空間 設 A 是一個 m×n

原创 MIT_線性代數筆記_04_A的LU分解

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 4: Factorization into A = LU 課程 4:A的LU分解 LU分解 我們從另一種角度來看待 Gauss 消元。 首先考

原创 DSOJ Placing apples(放蘋果)

題目鏈接 #include<stdio.h> //Placing Apples /* 解題分析: 設f(m,n) 爲m個蘋果,n個盤子的放法數目,則先對n作討論, 當n>m:必定有n-m個盤子永遠

原创 MIT_線性代數筆記_05_轉置、置換、空間R^n

MIT 公開課:Gilbert Strang《線性代數》課程筆記(彙總) Lecture 5: Transposes, permutations, spaces R^n 課程 5:轉置、置換、空間R^n 置換矩陣(permutatio

原创 一道積分不等式的證明

設 f(x) 是閉區間 [0,1] 上滿足 f(0)=f(1)=0 的連續可微函數,求證不等式 (∫10f(x)dx)2≤112∫10|f′(x)|2dx, 並且等號成立當且僅當 f(x)=Ax(1−x), 其中 A 是常數