This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
/* | |
Este archivo de cabecera proporciona macros para pedir los datos de forma segura. | |
Enlace: www.github.com/MrDave1999/pscanf.h | |
*/ | |
#include <pscanf.h> | |
//En este archivo están las funciones que realizan la operación básica en una cola |
This file contains 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
using System; | |
using System.Collections.Generic; | |
class ListP | |
{ | |
private int data; | |
public int getData() { return data; } | |
public void setData(int data) | |
{ | |
this.data = data; |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
int BBIterative(int* pv, int data, int size) | |
{ | |
int first = 0; | |
int end = size-1; | |
int medium; | |
unsigned int i = 0; | |
while(first <= end) |
This file contains 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
#ifndef _BUBBLESORT_H | |
#define _BUBBLESORT_H | |
int BubbleSort(int*const parray, const int size) | |
{ | |
int count; //contar iteraciones. | |
int total = 0; //total de iteraciones. | |
int* i; | |
int* psize = parray + size; | |
int aux; |
This file contains 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 <stdio.h> | |
#define MAX_NUM 50 | |
int SelectionSort(int*const pnum, const int size) | |
{ | |
int* i = pnum; | |
int* j; | |
int* min; | |
int* psize = pnum + size; | |
int aux; |
This file contains 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
using System; | |
class Program | |
{ | |
static void Main() | |
{ | |
int data1; | |
double data2; | |
int []arrInt = new int[10]{0, 5, 10, 15, 20, 25, 30, 35, 40, 45}; | |
double []arrFloat = new double[10]{0, 5.5, 10.5, 15.4, 20.5, 25.5, 30.67, 35.98, 40.32, 45.90}; |
This file contains 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 <stdio.h> | |
#define MAX_NUM 50 | |
int InsertionSort(int* const parray, const int size) | |
{ | |
int aux; | |
int* i; | |
int* j; | |
const int* const psize = parray + size; | |
const int* const pbegin = parray - 1; //este puntero apunta a la dirección base del arreglo. |
This file contains 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 <stdio.h> | |
#define MAX_NUM 50 | |
int ShellSort(int* const parray, const int size) | |
{ | |
int aux; | |
int count = 0; | |
int total = 0; | |
int* i; | |
const int* const psize = parray + size; |
This file contains 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
using System; | |
class Alphabet | |
{ | |
private char[]abc = new char[26]; | |
private int[] countUpper = new int[26]; | |
private int[] countLower = new int[26]; | |
public Alphabet() | |
{ |
This file contains 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 <stdio.h> | |
#define MAX_NUM 50 | |
void quicksort(int* const a, int begin, int end) | |
{ | |
int i, j, medium, aux; | |
int pivote; | |
medium = (begin + end) / 2; | |
pivote = a[medium]; |
OlderNewer