代码搜索:递归回溯
找到约 2,805 项符合「递归回溯」的源代码
代码结果 2,805
www.eeworm.com/read/455569/7369942
n-+-
可以在线性时间构造出一个解
但是要找出所有解得话,还是要回溯搜索
#include "stdio.h"
#include "stdlib.h"
int gs[10001];
int n;
int found;
int qmod(int r,int n)
{
return (2*r + n/2 - 3)%n;
}
/*
* works f
www.eeworm.com/read/382803/8999453
java mergesort.java
/* 递归描述的合并排序算法 */
public class MergeSort {
public static void mergeSort(Comparable a[],int left,int right)
{
Comparable[] b=new Comparable[a.length];
if (left
www.eeworm.com/read/382796/9000107
java mergesort.java
/* 递归描述的合并排序算法 */
public class MergeSort {
public static void mergeSort(Comparable a[],int left,int right)
{
Comparable[] b=new Comparable[a.length];
if (left
www.eeworm.com/read/382796/9000129
java mergesort.java
/* 递归描述的合并排序算法 */
public class MergeSort {
public static void mergeSort(Comparable a[],int left,int right)
{
Comparable[] b=new Comparable[a.length];
if (left
www.eeworm.com/read/274763/10853904
cpp bl.cpp
//三种遍历二叉树的递归
#include
#include "bl.h"
bitree t;
void main()
{
int circle=1;
int choice;
cout
www.eeworm.com/read/455581/7369921
txt a.txt
1.先序遍历非递归算法
#define maxsize 100
typedef struct
{
Bitree Elem[maxsize];
int top;
}SqStack;
void PreOrderUnrec(Bitree t)
{
SqStack s;
StackInit(s);
p=t;
while (p!=null || !St
www.eeworm.com/read/145817/12700667
java reverse.java
// =============== Program Description ===============
// 程序名称: reverse.java
// 程序目的: 运用递归设计一个将字符串反转的程序。 */
// Written By Kuo-Yu Huang. (WANT Studio.)
// ============================
www.eeworm.com/read/246291/12740586
frm 例11.frm
VERSION 5.00
Begin VB.Form frm8_7_6
Caption = "例11:利用递归求m,n的最大公约数"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 6270
www.eeworm.com/read/119955/14816042
cpp 2.cpp
#include
int function(int n)
{
long int resualt;
//递归成法
if(n==0)resualt=1;
else resualt=n*function(n-1);
return resualt;
}
int main()
{
long int num;
cout
www.eeworm.com/read/119516/14827480
cpp 实验三加强题一.cpp
#include
#include"BinaryTree.h"
void main(void)
{
char exit='y';
while(exit=='Y'||exit=='y')
{
cout