原创 《算法導論》學習筆記——最長公共子序列(動態規劃)

最長公共子序列(LongestCommonSubsequence Problem;LCS) 問題描述 給定兩個序列X=x1,x2,x3...,xm 和Y=y1,y2,y3,...,yn ,求X和Y的最長公共子序列。 例子:X=A,B,C

原创 OVa Online Judge 學習筆記- AOAPC I: Volume 2. Data Structure Lists

一、題目 二、C++ STL Container 原因:避免自己構造相應的list,包括靜態存儲結構,鏈式存儲結構。 1.數組 array:<array> Arrays are fixed-size sequence container

原创 數據結構專題——二叉查找樹

一、二叉查找樹(Binary Search Tree) 名稱 二叉搜索樹(Binary Search Tree) 有序二叉樹(Ordered Binary Tree) 已排序二叉樹(Sorted Binary Tree) 二叉查找樹能夠

原创 mysql初探

服務器使用mysql.server start啓動服務 否則會出現以下錯誤: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ 命令行模式連接數據

原创 [leetcode]copy-list-with-random-pointer

題目 A linked list is given such that each node contains an additional random pointer which could point to any node in th

原创 使用Scrapy對新聞進行爬蟲(零)

Scrapy學習筆記 目標 使用Scrapy爬蟲框架對獲取網站新聞數據。 爬蟲目標網站:http://tech.163.com 提取內容: url 新聞地址 source 新聞來源 title 新聞標題 editor 新聞編輯 ti

原创 PHP中的數組

數組用途 array list/vector hash table dictionary collection queue stack tree multidimensional array PHP數組本質 hash table

原创 [leetcode]largest-rectangle-in-histogram

題目 Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the are

原创 使用Scrapy對新聞進行爬蟲(一)

Scrapy Item Pipeline學習筆記 Item Pipeline 主要用於從網頁抓取(spider)後對數據Item進行收集,寫入數據庫或文件中。 執行方式 spider 在獲得item後,會傳遞給item pipeline,