A stack data structure implemented using a dynamic array.
$ em list
$ em install
$ em build lib
#include "EmeraldsStack.h"
#include <stdio.h>
int main(void) {
EmeraldsStack *st = stack_new();
stack_push(st, 2);
stack_push(st, 3);
stack_push(st, -1);
printf("item %d, should be -1\n", stack_pop(st));
printf("item %d, should be 3\n", stack_pop(st));
printf("peek item %d should be 2\n", stack_peek(st));
printf("item %d, should be 2\n", stack_pop(st));
}- Write tests
- Fork it (https://github.com/The-Fourth-Wall/Emeralds/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
- oblivious - creator and maintainer