Skip to content

Instantly share code, notes, and snippets.

View wmoralesdev's full-sized avatar
🖐️

Walter Morales wmoralesdev

🖐️
View GitHub Profile
#include <iostream>
#include "../ds/ds.hpp"
using namespace std;
node* getInterval(node* list, int n, int d);
void push(node** list, node* n);
int main(void) {
node* list = new node(1);
list->next = new node(2);
@wmoralesdev
wmoralesdev / BST
Created January 31, 2022 17:45
BST Implementation in C++
#include <iostream>
using namespace std;
struct node {
int data;
node* left;
node* right;
node() {
left = NULL;
ejercicio3:-
open('lista_numeros.txt', read, Valores),
llenar_lista(Valores, L),
close(Valores),
conteo(L, P, N),
open('total_cont.txt', write, Total),
@wmoralesdev
wmoralesdev / threads.c
Created September 13, 2021 05:00
Thread example in C
// To compile in linux with gcc
// compile: gcc -pthread <filename>.c -o <filename>
// run: ./<filename>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <string.h>
// Struct for args aggrupation
{
"schemaVersion": 1,
"label": "Booster Sessions",
"message": "Dynamic Programming",
"color": "blueviolet",
"logoSvg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"521.3\" height=\"665.7\" viewBox=\"0 0 521.3 665.7\"> <g id=\"Grupo_1\" data-name=\"Grupo 1\" transform=\"translate(122 -1949)\"> <ellipse id=\"Elipse_1\" data-name=\"Elipse 1\" cx=\"233\" cy=\"187.5\" rx=\"233\" ry=\"187.5\" transform=\"translate(-94 1977)\" fill=\"#fff\"/> <ellipse id=\"Elipse_2\" data-name=\"Elipse 2\" cx=\"51.5\" cy=\"44\" rx=\"51.5\" ry=\"44\" transform=\"translate(92 2511)\" fill=\"#fff\"/> <path id=\"Polígono_1\" data-name=\"Polígono 1\" d=\"M190.37,4.084a7,7,0,0,1,9.261,0L376.112,159.75a7,7,0,0,1-4.63,12.25H18.518a7,7,0,0,1-4.63-12.25Z\" transform=\"translate(337.884 2449.589) rotate(177)\" fill=\"#fff\"/> <g id=\"Elaniin-balloon\" transform=\"translate(-134.3 1925.8)\"> <path id=\"Trazado_18\" data-name=\"Trazado 18\" d=\"M299.2,561.2c5.8-5.9,12.5-12.5,18.4-19.2
{
"schemaVersion": 1,
"label": "Booster Sessions",
"message": "Algorithms",
"color": "green",
"logoSvg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"521.3\" height=\"665.7\" viewBox=\"0 0 521.3 665.7\"> <g id=\"Grupo_1\" data-name=\"Grupo 1\" transform=\"translate(122 -1949)\"> <ellipse id=\"Elipse_1\" data-name=\"Elipse 1\" cx=\"233\" cy=\"187.5\" rx=\"233\" ry=\"187.5\" transform=\"translate(-94 1977)\" fill=\"#fff\"/> <ellipse id=\"Elipse_2\" data-name=\"Elipse 2\" cx=\"51.5\" cy=\"44\" rx=\"51.5\" ry=\"44\" transform=\"translate(92 2511)\" fill=\"#fff\"/> <path id=\"Polígono_1\" data-name=\"Polígono 1\" d=\"M190.37,4.084a7,7,0,0,1,9.261,0L376.112,159.75a7,7,0,0,1-4.63,12.25H18.518a7,7,0,0,1-4.63-12.25Z\" transform=\"translate(337.884 2449.589) rotate(177)\" fill=\"#fff\"/> <g id=\"Elaniin-balloon\" transform=\"translate(-134.3 1925.8)\"> <path id=\"Trazado_18\" data-name=\"Trazado 18\" d=\"M299.2,561.2c5.8-5.9,12.5-12.5,18.4-19.2,90.9-90.9,216
{
"schemaVersion": 1,
"label": "Booster Sessions",
"message": "Data Structures",
"color": "blue",
"logoSvg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"521.3\" height=\"665.7\" viewBox=\"0 0 521.3 665.7\"> <g id=\"Grupo_1\" data-name=\"Grupo 1\" transform=\"translate(122 -1949)\"> <ellipse id=\"Elipse_1\" data-name=\"Elipse 1\" cx=\"233\" cy=\"187.5\" rx=\"233\" ry=\"187.5\" transform=\"translate(-94 1977)\" fill=\"#fff\"/> <ellipse id=\"Elipse_2\" data-name=\"Elipse 2\" cx=\"51.5\" cy=\"44\" rx=\"51.5\" ry=\"44\" transform=\"translate(92 2511)\" fill=\"#fff\"/> <path id=\"Polígono_1\" data-name=\"Polígono 1\" d=\"M190.37,4.084a7,7,0,0,1,9.261,0L376.112,159.75a7,7,0,0,1-4.63,12.25H18.518a7,7,0,0,1-4.63-12.25Z\" transform=\"translate(337.884 2449.589) rotate(177)\" fill=\"#fff\"/> <g id=\"Elaniin-balloon\" transform=\"translate(-134.3 1925.8)\"> <path id=\"Trazado_18\" data-name=\"Trazado 18\" d=\"M299.2,561.2c5.8-5.9,12.5-12.5,18.4-19.2,90.9-90.9
import axios from 'axios'
import styled from 'styled-components'
import { Link } from 'react-router-dom'
import { useState, useRef } from 'react'
import { useMutation } from 'react-query'
import { useHistory } from 'react-router-dom'
import Spinner from '../Components/Spinner'