add function stack_push
2 unresolved threads
2 unresolved threads
just like the tittle. Thanks for the review. ;D
Merge request reports
Activity
requested review from @orestis.malaspin
assigned to @richarda.tyarks
- stack.c 0 → 100644
1 #include "stack.h" 2 3 void stack_push(stack *s, int val) changed this line in version 2 of the diff
@richarda.tyarks pleeaaaaaase?
added 28 commits
-
66130f6e...42523a25 - 27 commits from branch
main
- da2c2fb5 - Merge branch 'main' into '5-add-push-function'
-
66130f6e...42523a25 - 27 commits from branch
added 1 commit
- 5401bb7f - change variable name val into value in function : stack_push
1 #include "stack.h" this one is still not solved @richarda.tyarks a real jedi would include stack.h there...
Edited by orestis.malaspin
- Resolved by orestis.malaspin
@richarda.tyarks a little effort to finish
@orestis.malaspin finish sir.
No no.
What I mean is that you have to reallocate to twice the CURRENT capacity. Then change the capacity variable too.
In this example you:
- Change the capacity of data only once for all (when top == DEFAULT_CAPACITY-1 which happens only once if you continuously push).
- Never change the capacity variable in your stack.
Edited by orestis.malaspinmentioned in commit 287ed7af
mentioned in issue #5 (closed)
Please register or sign in to reply