Collection of algorithms and data structures in C++ and Java

Overview

GitHub stars Java CI C++ CI License

Collection of algorithms and data structures in C++ and Java

Data structures

Graph algorithms

String algorithms

Sorting algorithms

Geometry algorithms

Optimization

  • Simplex algorithm java

Numerical algorithms

  • Fast Fourier transform (FFT) c++ java
  • Long arithmetics c++
  • Fast subset convolution java
  • Fast Walsh-Hadamar transform java
  • Karatsuba multiplication java
  • Newton interpolation java
  • Laguerre's root-finding algorithm c++

Number theory

  • Primes and divisors java c++
  • Factorization java c++
  • Euclidean algorithm java c++
  • Primitive root c++
  • Discrete logarithm c++
  • Discrete root c++
  • Multiplicative function java
  • Rational numbers java
  • Polynom class c++
  • Linear recurrence and Berlekamp-Massey algorithm c++
  • Modular operations c++

Combinatorics

Linear algebra

Comments
  • LICENSE?

    LICENSE?

    What is the license on this code? We would like to use your implementation of Tarjan's algorithm in one of our projects, but want to make sure we have the appropriate permission.

    The project I'd like to use the code in uses the NCSA open-source license (http://opensource.org/licenses/NCSA) so some sort of BSD or MIT license would be preferable.

    opened by adamsmd 2
  • Optimize C++ bigint equality/inequality operators

    Optimize C++ bigint equality/inequality operators

    No need to run the comparison twice.

    Also, starting from the least significant chunk results in a much faster comparison of numbers that are close to each other. It shouldn't influence the other cases, as there's little chance that two numbers with the same number of chunks will differ only in the most significant bits -- if they differ, they will most probably differ in the least significant bits as well.

    opened by adamsol 1
  • AhoCorasick broken

    AhoCorasick broken

    Looks like algorithm broken. For example

    ahoCorasick.addString("a");
    ahoCorasick.addString("aa");
    ahoCorasick.addString("abaaa");
    String s = "abaa";
    

    Answer will be [0] - second string got lost.

    opened by Katsz 1
  • MaxFlowDinic does not find blocking flows

    MaxFlowDinic does not find blocking flows

    https://github.com/indy256/codelibrary/blob/master/java/src/MaxFlowDinic.java

    In your implementation of Dinic's algorithm, you visit every edge only once in the DFS portion. This is wrong, in my opinion, as it does not guarantee that you create a blocking flow. Specifically, you may have to traverse edges more than once if you didn't saturate the path to the sink the first time.

    opened by godmar 1
  • Add Langford Pairing (https://en.wikipedia.org/wiki/Langford_pairing)

    Add Langford Pairing (https://en.wikipedia.org/wiki/Langford_pairing)

    I have been watching your repo for a long time. Now I want to contribute it. Please let me know if you want me to change the code style or anything else.

    Thanks

    opened by gaoyike 0
  • Maximum matching in general graph in E*sqrt(V)

    Maximum matching in general graph in E*sqrt(V)

    https://codeforces.com/contest/1198/submission/58096981 https://gist.github.com/min-25/aed29a23b004505d2094a5cddaf56ff9 https://arxiv.org/pdf/1703.03998.pdf

    feature 
    opened by indy256 0
Owner
Andrei Navumenka
Andrei Navumenka
Several algorithms and data structures implemented in C++ by me (credited to others where necessary).

Algorithms This repository contains my implementations of several algorithms and data structures in C++ (credited to others where necessary). It has i

Petar Veličković 581 Oct 1, 2022
Fundamentals of Data structures and algorithms in c++

Data Structures & Algorithms About the repository: Contains theories and programming questions related to fundamentals of data structures and algorith

fifu 44 Sep 23, 2022
Algorithms & Data structures in C++.

Algorithms & Data Structures in C++ 目标 ( goal ) : 经典的算法实现 (classical algorithms implementations) 服务器端 (based on linux/gcc) 正确,易于使用和改造, 一个头文件一个算法,并附带一个

xtaci 4.6k Sep 28, 2022
Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.

The Algorithms - C # {#mainpage} Overview The repository is a collection of open-source implementation of a variety of algorithms implemented in C and

The Algorithms 14.5k Sep 30, 2022
C++17 (-O2) template for competitive programming algorithms, which contains numerous math algorithms.

cpplibForCP C++17 (-O2) template for competitive programming algorithms, which contains numerous math algorithms. Aims: build a stable, fast, easy-to-

null 31 Sep 11, 2022
llvm-tutor is a collection of self-contained reference LLVM passes

llvm-tutor is a collection of self-contained reference LLVM passes. It's a tutorial that targets novice and aspiring LLVM developers.

Andrzej Warzyński 1.8k Oct 1, 2022
C++ implementations of well-known (and some rare) algorithms, while following good software development practices

ProAlgos: C++ This project is focused on implementing algorithms and data structures in C++, while following good software engineering practices, such

ProAlgos 472 Sep 26, 2022
Provide building blocks (software, hardware and algorithms) for implementing SLAM using small sensors

RemoteSLAM The purpose of this repo is to provide the building blocks (software drivers, hardware and algorithms) for implementing SLAM systems using

Autonomous Drones Lab, Tel Aviv University 38 Jan 20, 2022
CXXGraph is a Header-Only C++ Library for Graph Representation and Algorithms

CXXGraph is a small library, header only, that manages the Graph and it's algorithms in C++. In other words a "Comprehensive C++ Graph Library".

ZigRazor 164 Sep 26, 2022
Header-only C++ library for robotics, control, and path planning algorithms.

Header-only C++ library for robotics, control, and path planning algorithms.

null 350 Oct 1, 2022
c++ library including few algorithms and datastructures

c++ library including few algorithms and datastructures

null 2 Dec 25, 2021
Every week exercises for Introduction to Algorithms and Programming

cen109-algorithms commands to compile and link C and C++ programs gcc filename.c -o executableFileName g++ filename.cpp -o executableFileName filename

null 3 Mar 19, 2022
c language's datastruct and algorithms.

cdsaa 介绍 学习数据结构与算法的C语言实现 主要数据结构 动态字符串 动态数组 单向链表 栈 主要算法 更新中. . . 目录结构 |-- include |---- CArray.h 动态数组 |---- CList.h 单向链表 |---- CStack.h 栈 |---- CString

Ticks 1 Nov 24, 2021
Snowball compiler and stemming algorithms

Snowball is a small string processing language for creating stemming algorithms for use in Information Retrieval, plus a collection of stemming algorithms implemented using it.

Snowball Stemming language and algorithms 593 Sep 28, 2022
This repository contains path planning algorithms in C++ for a grid based search.

This repository contains path planning algorithms in C++ for a grid based search.

null 219 Sep 28, 2022
Library for building multi-level indoor routes using routing algorithms.

Library for building multi-level indoor routes using routing algorithms. You can easily construct routing graphs and find the shortest path for optimal indoor navigation.

Navigine 5 Mar 20, 2022
This library contains a set of algorithms for working with the routing graph.

Library for building multi-level indoor routes using routing algorithms. You can easily construct routing graphs and find the shortest path for optimal indoor navigation.

Navigine 5 Mar 20, 2022
IntX is a C++11 port of IntX arbitrary precision Integer library with speed, about O(N * log N) multiplication/division algorithms implementation.

IntX IntX is a C++11 port of IntX arbitrary precision Integer library with speed, about O(N * log N) multiplication/division algorithms implementation

Telepati 9 Mar 9, 2022
In this project, we implemented twelve different sorting algorithms.

C - Sorting algorithms & Big O In this project, we implemented twelve different sorting algorithms. Tests tests: Folder of test files. Provided by Alx

Nicholas M Mwanza 1 Oct 26, 2021