MCPcopy Create free account
hub / github.com/TheAlgorithms/C / shrink_array

Function shrink_array

data_structures/stack/dynamic_stack.c:79–92  ·  view source on GitHub ↗

* @brief As this is stack implementation using dynamic array this function will * shrink the size of stack by twice as soon as the stack's capacity and size * has significant difference. * * @param ptr Stack pointer * @param cap Capacity of stack * @return DArrayStack*: Modified stack */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

popFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected