This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C++ - Arboles Binaros de busqueda -Recorridos por amplitud | |
* | |
* Copyright 2014 Martin Cruz Otiniano | |
* | |
* Description: Recorrdos por Orden, Pre-Orden y Post-Orden | |
* | |
* Site: martincruz.me | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <time.h> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
int num, c; | |
srand(time(NULL)); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int fibo(int n) | |
{ | |
if(n == 0 || n == 1) | |
return n; | |
else | |
return fibo(n - 2) + fibo(n - 1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C++ - Algoritmo de selección de actividades | |
* | |
* Copyright 2014 Martin Cruz Otiniano | |
* | |
* Site: martincruz.me | |
*/ | |
#include<iostream> | |
#define MAX 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C++ - Algoritmo de Boyer Moore Horspool | |
* | |
* Copyright 2014 Martin Cruz Otiniano | |
* | |
* Site: martincruz.me | |
*/ | |
#include<iostream> | |
#include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int Ackerman(int m, int n) | |
{ | |
if(m==0) | |
return n+1; | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int Catalan(int n) | |
{ | |
if (n <= 0) | |
return 1; | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int hanoi(int n) | |
{ | |
if(n == 1) | |
return 1; | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C++ - Agenda con uso de struct | |
* | |
* Copyright 2014 Martin Cruz Otiniano | |
* | |
* Site: martincruz.me | |
*/ | |
#include <iostream> | |
#include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C++ - Ordenar numeros en una lista enlazada simple | |
* | |
* Copyright 2014 Martin Cruz Otiniano | |
* | |
* Description: Ordena mediante el criterio de burbuja una lista | |
* | |
* Site: martincruz.me | |
*/ |