These are some Java codes I wrote throughout my BCompSci.
Go to file
Diogo Cordeiro fc5aee5646 Add code
2021-02-07 06:32:49 +00:00
.gitignore Initial commit 2021-02-03 23:46:26 +00:00
bfs_scc.java Add code 2021-02-07 06:32:49 +00:00
bfs_shortest_path.java Add code 2021-02-07 06:32:49 +00:00
collections_count_if.java Add code 2021-02-07 06:32:49 +00:00
Couple.java Add code 2021-02-07 06:32:49 +00:00
DFS.java Add code 2021-02-07 06:32:49 +00:00
DirectedMultiGraph.java Add code 2021-02-07 06:32:49 +00:00
DirectedWeightedGraph.java Add code 2021-02-07 06:32:49 +00:00
FastPrint.java Add code 2021-02-07 06:32:49 +00:00
FastScanner.java Add code 2021-02-07 06:32:49 +00:00
FloydWarshall.java Add code 2021-02-07 06:32:49 +00:00
InsertSort.java Add code 2021-02-07 06:32:49 +00:00
Johnson.java Add code 2021-02-07 06:32:49 +00:00
knapsack.java Add code 2021-02-07 06:32:49 +00:00
LICENSE Initial commit 2021-02-03 23:46:26 +00:00
LIS.java Add code 2021-02-07 06:32:49 +00:00
minimum_gap_schedulling.java Add code 2021-02-07 06:32:49 +00:00
README.md Add code 2021-02-07 06:32:49 +00:00
SegmentTree.java Add code 2021-02-07 06:32:49 +00:00
ValueThenKeyComparator.java Add code 2021-02-07 06:32:49 +00:00

JavaAlgorithms

These are some Java code I wrote throughout my first degree in Computer Science. There is some third party code properly credited and with its associated license.

Files Descriptions

Code I wrote

  • Directed MultiGraph - Adjacency-list non-weighted directed multi-graphs (data structure)
  • Directed Weighted Graph - Adjacency-list n-weighted directed graphs (data structure)
  • Dijkstra - Adjacency-list Dijkstra's algorithm implementation (SSC non-negative weights only)
  • Prim - Adjacency-list Prim's algorithm implementation (MST)
  • Bellman-Ford - Adjacency-list Bellman-ford (SSC)
  • Floyd Warshall - Adjacency-matrix Floyd Warshall (APSP)
  • Johnson - Johnson's Algorithm (sparse graph APSP)
  • Insert Sort - An Insertion Sort implementation (sorting)
  • DFS and Topological Sorting - Adjacency-list DFS with TopSort implementation (graph traversal and sorting)
  • Kosaraju-Sharir - Adjacency-list Kosaraju-Sharir implementation (SCC)
  • BFS non-directed SCC - Adjacency-list BFS implementation to identify SCC in a non-directed graph (graph traversal and SCC non-directed only)
  • BFS non-weighted SSC - Adjacency-list BFS for shortest path in a non-weighted graph (SSC non-weighted)
  • LIS - A Longest Increasing Sequence algorithm implmentation (substring)
  • Collections Count If - Counts elements for which predicate p returns true (collection utility)

Third party code

  • Couple - A AOSP class to handle 2-tuples
  • Segment Tree - A Segment Tree data structure implementation derived from Segewick and Wayne's Algorithms, 4th ed. book
  • ValueThenKeyComparator - A Comparator that sorts Map.Entry objects with Comparable keys and values, first by value, then by key
  • FastScanner - Fast Input from STDIN in Java
  • FastPrint - Fast Output from STDOUT in Java

Example code