Skip to content

Instantly share code, notes, and snippets.

@regstrtn
regstrtn / minmaxheap.py
Last active April 27, 2023 14:52 — forked from gnarmis/minmaxheap.py
min max heap implementation in python
from math import log, floor, pow
class MinMaxHeap(object):
def __init__(self, array=[]):
super(MinMaxHeap, self).__init__()
self.heap = [0]
for i in array:
self.Insert(i)
@regstrtn
regstrtn / shell.c
Created August 6, 2016 10:31 — forked from parse/shell.c
Simple shell in C
/* Compile with: g++ -Wall –Werror -o shell shell.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>