implementation java_java-algorithms-implementation

Java : Algorithms and Data Structure 68747470733a2f2f6170692e7472617669732d63692e6f72672f70686973686d616e333537392f6a6176612d616c676f726974686d732d696d706c656d656e746174696f6e2e7376673f6272616e63683d6d6173746572

The algorithms and data structures are implemented in Java.

This is a collection of algorithms and data structures I've implemented in my academic and professional life. The code isn't optimized but is written to be correct and readable. The algorithms and data structures are tested and, unless noted, believed to be correct.

Created by Justin Wetherell

Support me with a donation

1554baf3c3c38d9c80a7d7c7ef472d48.png

What's been implemented:

Table of Contents

Data Structures

Mathematics

Distance

chebyshev

euclidean

Division

using a loop

using recursion

using shifts and multiplication

using only shifts

using logarithm

Multiplication

using a loop

using recursion

using only shifts

using logarithms

Exponentiation

recursive exponentiation

fast recursive exponentiation

fast modular recursive exponentiation

Primes

is prime

prime factorization

sieve of eratosthenes

Miller-Rabin test

Greatest Common Divisor

using Euclid's algorithm

using recursion

Permutations

strings

numbers

Modular arithmetic

add

subtract

multiply

divide

power

Numbers

Integers

to binary String

using divide and modulus

using right shift and modulus

using BigDecimal

using divide and double

is a power of 2

using a loop

using recursion

using logarithm

using bits

to English (e.g. 1 would return "one")

Longs

to binary String

using divide and modulus

using right shift and modulus

using BigDecimal

Complex

addition

subtraction

multiplication

absolute value

polar value

Graphs

Search

Sequences

Sorts

String Functions

Reverse characters in a string

using additional storage (a String or StringBuilder)

using in-place swaps

using in-place XOR

Reverse words in a string

using char swaps and additional storage (a StringBuilder)

using StringTokenizer and additional (a String)

using split() method and additional storage (a StringBuilder and String[])

using in-place swaps

Is Palindrome

using additional storage (a StringBuilder)

using in-place symetric element compares

Subsets of characters in a String

Edit (Levenshtein) Distance of two Strings (Recursive, Iterative)

Find in lexicographically minimal string rotation

Find in lexicographically maximal string rotation

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值