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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import random as rand | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# -----------------FUNCIONES----------------- # | |
def turn_right(): |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# --------------------------LIBRERIAS-------------------------- # | |
# ------------------------------------------------------------- # | |
import random as rand | |
import matplotlib.pyplot as plt | |
# ------------------------------------------------------------- # | |
# ---------------------------CLASES---------------------------- # | |
class Node: | |
def __init__(self, val): |
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 i, size_queue = 5; | |
void queue_overflow() | |
{ | |
printf("Overflow!"); | |
exit(0); | |
} |
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> | |
typedef struct node | |
{ | |
int data; | |
struct node *next; | |
} node_t; | |
void push_end(node_t **head, int value) |
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 size_stack = 7; | |
void print_stack(int *stack, int *top) | |
{ | |
int i; | |
for(i = 0; i < *top; i++) printf(" %i ", *(stack + i)); | |
} |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def parent(index_query): | |
index_parent = int(index_query/2) | |
return index_parent | |
def left_child(index_query): | |
index_lchild = (2 * index_query) + 1 | |
return index_lchild |
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> | |
void merge(int *array, int p, int q, int r) | |
{ | |
// Declaracion de variables | |
int i, j, k; | |
int n_1 = (q - p) + 1; | |
int n_2 = (r - q); | |
int *L, *R; |
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> | |
#include <time.h> | |
void main() | |
{ | |
int counter = 0; | |
int size, num, aux, lim_izq, lim_der; | |
printf("Ingrese el limite superior de la lista: "); |
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 <math.h> | |
void suma_elem_array(int num_data, int *array_x, int *array_y, float *sum_x, float *sum_y, float *sum_xy, | |
float *sum_cuad_x, float *sum_cuad_y) | |
{ | |
/* ---------------------------------- */ | |
int i; | |
/* ---------------------------------- */ |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# =============================================================================================================== # | |
# =============================================================================================================== # | |
# Importar Librerías | |
import time | |
import os | |
import numpy as np |