原创 鏈棧
#include <iostream> using namespace std; typedef int StackElemType; typedef struct Node { StackElemType data;
原创 函數指針之探祕
#include <stdio.h> //演示函數指針的用法 int max (int x,int y) { return x>y?x:y; } int min (int x,int y) { return x<y?x:y; }
原创 位運算 實現加減法
推薦兩篇寫的比較好的博文! 1.http://blog.csdn.net/tianjian9900/article/details/41620407 2.http://blog.csdn.net/eeeduo/article/detail
原创 java的Vector用法示例
package com.huowolf; import java.util.Enumeration; import java.util.NoSuchElementException; import java.util.Vector;
原创 打印楊輝三角(STL版隊列)
#include <iostream> #include <queue> using namespace std; void YangHuiTriangle(int n); int main() { cout<<"請輸入楊輝三角的層數
原创 LED顯示模擬(java的GUI顯示)
//先上效果圖,每一秒改變一次顏色 //這個小程序生成的jar包下載地址:http://pan.baidu.com/s/1sjFj9ST 下面上源代碼: //1.color.java package com.huowolf; imp
原创 一元多項式的加法和乘法
#include <iostream> #include <stdlib.h> using namespace std; typedef struct { int coef; //係數項 int exp; //指數項 }ElemT
原创 篩選法求素數(數組和BitSet分別存儲)
/* * 篩選法求素數 <1> 先將1挖掉(因爲1不是素數)。 <2> 用2去除它後面的各個數,把能被2整除的數挖掉,即把2的倍數挖掉。 <3> 用3去除它後面的各數,把3的倍數挖掉。 <4> 分別用4、5…各數作爲除數去除這些數
原创 單鏈表(不帶頭結點)
//不帶頭結點 #include <stdio.h> #include <stdlib.h> typedef int ElemType; typedef struct Node { ElemType data; struct No
原创 httpClient模擬登陸校內某系統
package com.huowolf; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import or
原创 最小生成樹算法(2)------------Kruskal
#include <iostream> #include <algorithm> using namespace std; #define MAX 1000 struct edge { int u; //頂點 int v; //頂點
原创 直接插入排序與希爾排序
代碼是何其的相似啊!!/* Name: InsertSort Copyright: Author: huowolf Date: 05/07/15 16:18 Description: 直接插入排序的實現 */ #inc
原创 jsoup抓取豆瓣美女
package com.huowolf; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import
原创 一個HashMap和TreeSet綜合使用的小例子
package com.huowolf; import java.util.HashMap; import java.util.TreeSet; /* * 統計字符串中每個字母出現的次數 * 輸出時要求按照次數降序排序,如果出現次
原创 拓撲排序(基於鄰接表實現)
#include <iostream> #include <stack> using namespace std; #define MAX 100 typedef char VertexType; typedef struct A