Collections-C icon indicating copy to clipboard operation
Collections-C copied to clipboard

A library of generic data structures for the C language.

Results 24 Collections-C issues
Sort by recently updated
recently updated
newest added

**Summary:** The array reverse function fails to correctly reverse the elements. Look at the following example: ```c // ... struct cc_array *arr; cc_array_new(&arr); int v0 = 0, v1 = 1,...

It might be convinient for collections to have a [fold/reduce](https://en.wikipedia.org/wiki/Fold_%28higher-order_function%29) function so that you may do something like this: ``` c void fn(void *e1, void *e2, void *result) { int...

feature request
meta

Issue repro steps: 1. Add at least 2 elements with deque_add_first. 2. Use deque_remove_at to get a element which index greater than 0,your will find element is wrong. I think...

In the `common.h` header file, `MAX_POW_TWO` is defined like this: ``` #ifdef ARCH_64 #define MAX_POW_TWO (((size_t) 1) > 1; n |= n >> 2; n |= n >> 4; n...

I would love to see self balancing Binary Search Tree data structure with generics support. Ready to start working on it as long as it is OK. Here I have...

feature request

The documentation gives some hints that the default `hashtable` and `hashset` implementation are assuming C strings as keys. However, the "official" [documentation](https://srdja.github.io/Collections-C/#hashtableconf) use some defines that have been removed in...

Would you like to [replace any double quotes](https://github.com/srdja/Collections-C/blob/4a5d1f4b68ec4aa80c797fd57309140867e82210/src/stack.c#L21) by [angle brackets around file names for include statements](http://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename)?

There should be a more convenient way to free data after it's removed from a container and it should be: - an optional operation - should not assume the same...

This fixes an out-of-bounds lookup, which results in a segfault when popping/heapifying: ```diff diff --git a/src/pqueue.c b/src/pqueue.c index 0293922..875d40c 100644 --- a/src/pqueue.c +++ b/src/pqueue.c @@ -306,13 +306,13 @@ static void...

Like standard C includes does: #ifdef __cplusplus extern "C" { #endif