Skip to content

Commit 7873789

Browse files
Revert "Add time and space complexity information to various algorithms"
This reverts commit 51915ff.
1 parent 059ace6 commit 7873789

File tree

114 files changed

+6
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+6
-335
lines changed

cache/lru.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// lru.go
2-
// description : Least Recently Used (LRU) cache
3-
// details : A Least Recently Used (LRU) cache is a type of cache algorithm used to manage memory within a computer. The LRU algorithm is designed to remove the least recently used items first when the cache reaches its limit.
4-
// time complexity : O(1)
5-
// space complexity : O(n)
6-
// ref : https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)
7-
81
package cache
92

103
import (

checksum/crc8.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// details:
44
// A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks
55
// and storage devices to detect accidental changes to raw data.
6-
// time complexity: O(n)
7-
// space complexity: O(1)
86
// See more [CRC](https://en.wikipedia.org/wiki/Cyclic_redundancy_check)
97
// author(s) [red_byte](https://github.com/i-redbyte)
108
// see crc8_test.go

checksum/luhn.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// lunh.go
22
// description: Luhn algorithm
33
// details: is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, etc [Lunh](https://en.wikipedia.org/wiki/Luhn_algorithm)
4-
// time complexity: O(n)
5-
// space complexity: O(1)
64
// author(s) [red_byte](https://github.com/i-redbyte)
75
// see lunh_test.go
86

cipher/caesar/caesar.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
// Package caesar is the shift cipher
2-
// description: Caesar cipher
3-
// details : Caesar cipher is a type of substitution cipher in which each letter in the plaintext is shifted a certain number of places down the alphabet.
4-
// time complexity: O(n)
5-
// space complexity: O(n)
62
// ref: https://en.wikipedia.org/wiki/Caesar_cipher
73
package caesar
84

cipher/diffiehellman/diffiehellmankeyexchange.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
// Package diffiehellman implements Diffie-Hellman Key Exchange Algorithm
2-
// description: Diffie-Hellman key exchange
3-
// details : Diffie-Hellman key exchange is a method of securely exchanging cryptographic keys over a public channel by combining private keys of two parties to generate a shared secret key.
4-
// time complexity: O(log(n))
5-
// space complexity: O(1)
62
// for more information watch : https://www.youtube.com/watch?v=NmM9HA2MQGI
73
package diffiehellman
84

cipher/polybius/polybius.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
// Package polybius is encrypting method with polybius square
2-
// description: Polybius square
3-
// details : The Polybius algorithm is a simple algorithm that is used to encode a message by converting each letter to a pair of numbers.
4-
// time complexity: O(n)
5-
// space complexity: O(n)
62
// ref: https://en.wikipedia.org/wiki/Polybius_square#Hybrid_Polybius_Playfair_Cipher
73
package polybius
84

cipher/railfence/railfence.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// railfence.go
2-
// description: Rail Fence Cipher
3-
// details: The rail fence cipher is a an encryption algorithm that uses a rail fence pattern to encode a message. it is a type of transposition cipher that rearranges the characters of the plaintext to form the ciphertext.
4-
// time complexity: O(n)
5-
// space complexity: O(n)
6-
// ref: https://en.wikipedia.org/wiki/Rail_fence_cipher
71
package railfence
82

93
import (

cipher/rot13/rot13.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
// Package rot13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the alphabet.
2-
// description: ROT13
3-
// details: ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the alphabet. it is a special case of the Caesar cipher
4-
// time complexity: O(n)
5-
// space complexity: O(n)
62
// ref: https://en.wikipedia.org/wiki/ROT13
73
package rot13
84

cipher/rsa/rsa.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// thus both the Encrypt and Decrypt are not a production
77
// ready implementation. The OpenSSL implementation of RSA
88
// also adds a padding which is not present in this algorithm.
9-
// time complexity: O(n)
10-
// space complexity: O(n)
119
// author(s) [Taj](https://github.com/tjgurwara99)
1210
// see rsa_test.go
1311

cipher/rsa/rsa2.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
rsa2.go
33
description: RSA encryption and decryption including key generation
44
details: [RSA wiki](https://en.wikipedia.org/wiki/RSA_(cryptosystem))
5-
time complexity: O(n)
6-
space complexity: O(1)
75
author(s): [ddaniel27](https://github.com/ddaniel27)
86
*/
97
package rsa

0 commit comments

Comments
 (0)