原创 使用gensim計算文檔的相似度
gensim是一個主題模型的python庫,可以在官網下載http://radimrehurek.com/gensim/index.html 以下代碼使用gensim來計算文檔之間的相關性,使用的是tfidf模型。文檔在下面用一句話代替
原创 Longest Substring Without Repeating Characters —leetcode第三題
Given a string, find the length of the longest substring without repeating characters. For example, the longest substri
原创 算法導論—最長公共子序列
#include <iostream> #include <vector> #include <utility> #include <string> #include <utility> using namespace std; v
原创 二叉樹轉爲有序列表
#include <iostream> struct BinaryBode { int val; BinaryBode *left; BinaryBode *right; BinaryBode(int v=0,BinaryBod
原创 單鏈表反轉
#include <iostream> #include <string> using namespace std; template<typename Object> class linkList { private: struc