baojie
|
codepad
|
|
baojie
|
Saved pastes by baojie:
//21 Binary Search on sorted array
//2011-06-19
#include <iostream>
using namespace std;
|
view (30 lines, 1 line of output) |
//20 Compare recursive and interative factorial functions
//2011-06-19
#include <iostream>
#include <time.h>
|
view (37 lines, 3 lines of output, 1 comment) |
//17 Remove chars from a string
// Use char array instead of hash map
//2011-06-19
#include <iostream>
|
view (35 lines, 1 line of output) |
//16 Find the first characters in an string that appears only once
//2011-06-19
#include <iostream>
#include <map>
|
view (30 lines, 1 line of output) |
//14 Queue and Tree BFS With No Recursion
// Key is the function DFS
//2011-06-18
#include <iostream>
|
view (111 lines, 1 line of output) |
//15 Find LowestCommon Anscestor in a Binary Search Tree
// In BST: left <= self <= right
//2011-06-18
#include <iostream>
|
view (79 lines, 19 lines of output) |
//10 Determine if a list is cyclic
//2011-06-18
#include <iostream>
using namespace std;
|
view (72 lines, 6 lines of output) |
//09 Find the m-th-to-last element of a linked list
//2011-06-18
#include <iostream>
using namespace std;
|
view (55 lines, 2 lines of output) |
//08 Remove head of a linked list
//2011-06-18
#include <iostream>
using namespace std;
|
view (48 lines, 3 lines of output) |
//05 Delete an element from a linked list
//only read "delete" function. The other functions are from example 04
// http://codepad.org/mSBjdVNy
//2011-06-18
|
view (97 lines, 8 lines of output) |
//Compare two integers without using any comparative operators
#include <stdio.h>
//return 1 if n1==n2, otherwise return 0
|
view (18 lines, 2 lines of output) |