fizzbuzz/stack/README.md

40 lines
678 B
Markdown
Raw Normal View History

2011-08-15 18:54:11 +00:00
Stack (vanilla C)
===
Implement `stack.c` with the following methods (as defined in `include/stack.h`)
* create
* push
* pop
* peek
* length
* destroy
The underlying implementation may be
* dynamically-sized array
* linked-list
* any other ordered data structure
The storage strategy may
* make copies of the original elements
* store pointers to the original elements
2011-08-16 15:33:43 +00:00
The implementation must pass the following test suite `stack-test.c`
2011-08-15 18:54:11 +00:00
tar xf stack.tar.gz -C ~/
2011-08-15 18:54:11 +00:00
cd ~/stack
mkdir -p build
2011-08-15 18:54:11 +00:00
cd build
cmake ../
make
2011-08-15 18:54:11 +00:00
./stack-test
Prep
===
rm -rf stack/stack.c
touch stack/stack.c
tar czf stack.tar.gz stack/