Skip to content

A C library containing data structures and algorithms, especially for Competitive Programming.

Notifications You must be signed in to change notification settings

tsingwang/libcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libcp

A C library containing data structures and algorithms, especially for Competitive Programming.

Here are some implementation inspiration:

Usage

# Install libcp
sudo make install
export LIBRARY_PATH=/usr/local/lib

# Use libcp
gcc your_code.c -l cp

# Generate an independent file with the suffix _combined.c
combine your_code.c

Library list

  • sds: A simplification of Redis SDS
  • vector: dynamic array, can be used as stack
  • deque: double-ended queue, can be used as queque
  • heap: binary heap, for priority_queue
  • dict: open addressing hash table, for unordered_set and unordered_map
  • rbtree: red-black tree, for map
  • bitset

No implementation

  • list: doubly-linked list, fast insertion in the middle, but slow positioning

About

A C library containing data structures and algorithms, especially for Competitive Programming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published