From 88de94d1b4cbc29cf29e275a3f827973de94cd3a Mon Sep 17 00:00:00 2001 From: Stepfen Shawn Date: Wed, 8 Apr 2020 18:30:07 +0800 Subject: [PATCH] Add syntax highlight --- data_structures/stack/README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/data_structures/stack/README.md b/data_structures/stack/README.md index 18bd2fb1..c90459ac 100644 --- a/data_structures/stack/README.md +++ b/data_structures/stack/README.md @@ -13,25 +13,35 @@ You need to only import the **stack.h** ### Public interface -``` void initStack(); ``` +```c +void initStack(); +``` Initializes the stack with a capacity of 10 elements. -``` void push(void * object); ``` +```c +void push(void * object); +``` pushs the argument onto the stack -``` void * pop(); ``` +```c +void * pop(); +``` pop: pops the top element of the stack from the stack. assumes: stack not empty. -``` int size(); ``` +```c +int size(); +``` gets the number of elements of the stack. -``` int isEmpty(); ``` +```c +int isEmpty(); +``` returns 1 if stack is empty otherwise 0.