windliu1567
这家伙很懒,什么也没写
递归法实现八皇后问题
int Correct (int row, int col) //判断第row行的皇后是否会和第0行到第row-1行的皇后冲突 { for (int i = 0; i < row; i++) { if (col == A[i] || row + col == i + A[i] || (row
C++/C 15 0 TEXT/X-C 2020-07-26 02:07:47
C求解约瑟夫问题的源代码
CLinkList::Josephus(int n) //尾插法建立循环链表 { if(nnext=rear->next; rear->next=s; rear=s; } Node *q=rear->next; rear->next=rear->ne
C++ 23 0 CPP 2019-02-27 05:02:08
完整的二叉排序树的代码和测试程序
void InsertBST(BiNode *&r, BiNode *s) { if ( r == NULL) r = s; else if (s->data data ) InsertBST(r->lch, s); else InsertBST(r->rch, s); } void Create(
其他 61 0 CPP 2018-12-09 11:12:18