Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Teiva Harsanyi committed Feb 21, 2023
1 parent 662243a commit 6f22a74
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 104 deletions.
5 changes: 0 additions & 5 deletions 2015/day22-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import (
"math"
)

/*
at least one damage
if can't afford to cast a spell => loss
least amount of mana to still win a fight
*/
func fs1(playerHitPoints, playerMana, bossHitPoints, bossDamage int, abilities map[string]Spell) int {
player := Player{
hitPoints: playerHitPoints,
Expand Down
9 changes: 0 additions & 9 deletions 2016/day14-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ pub fn fn1(salt: &str, nth_key: i64, length: i64) -> i64 {
}
}

/*
3 of the same character in a row (first triplet to consider only) => 777
One of the next 1000 hashes contains the same character 5 times => 77777
*/
1
}

Expand Down Expand Up @@ -151,11 +147,6 @@ pub fn fn2(salt: &str, nth_key: i64, length: i64, additional_hashings: i64) -> i
}
}

/*
3 of the same character in a row (first triplet to consider only) => 777
One of the next 1000 hashes contains the same character 5 times => 77777
*/
1
}

#[cfg(test)]
Expand Down
6 changes: 0 additions & 6 deletions 2016/day7-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ pub fn fn2(input: &str) -> i32 {
.count() as i32
}

/*
SSL: ABA (outside) AND a BAB (inside)
ABA: 3-char sequence xyx (x != y)
BAB: yxy
*/
fn abas(s: &str) -> Vec<String> {
let mut res = Vec::new();
for i in 0..s.len() {
Expand Down
10 changes: 0 additions & 10 deletions 2017/day15-go/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package main

/*
next = (previous * factor) % 2147483647
factor a = 16807
factor b = 48271
*/
const (
factorA = 16807
factorB = 48271
Expand All @@ -24,10 +18,6 @@ func fs1(repeat, a, b int) int {
return sum
}

/*
a % 4 == 0
b % 8 == 0
*/
func fs2(repeat, a, b int) int {
sum := 0
for i := 0; i < repeat; i++ {
Expand Down
13 changes: 0 additions & 13 deletions 2017/day21-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ import (
lib "github.com/teivah/advent-of-code"
)

/*
.#.
..#
###
size % 2 == 0
=> convert each 2x2 into 3x3 using the corresponding enhancement rule
size % 3 == 0
=> convert 3x3 into 4x4
input: rotate or flip
*/
func fs1(input io.Reader, iterations int) int {
scanner := bufio.NewScanner(input)
options := make(map[string]string)
Expand Down
5 changes: 0 additions & 5 deletions 2020/day20-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,6 @@ func fs2(input io.Reader) int {
return 0
}

/*
#
# ## ## ###
# # # # # #
*/
func findSeaMonster(board [][]bool) int {
found := false
for row := 0; row < len(board)-2; row++ {
Expand Down
12 changes: 0 additions & 12 deletions 2020/day25-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ import (
"io"
)

/*
handshake:
start with v=1
repeat 0 .. loop size:
v *= subject number
v %= 20201227
card: cardPK = sn(7)
door: doorPK = sn(Y)
*/
func fs1(cardPK, doorPK int) int {
cardLoopSize := 0
for ; ; cardLoopSize++ {
Expand Down
10 changes: 0 additions & 10 deletions 2022/day15-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ struct Map {
max_y: i32,
}

/*
..........
....#.....
...###....
..##S##...
...###....
....#.....
..........
*/

impl Map {
fn new(min_x: i32, min_y: i32, max_x: i32, max_y: i32) -> Self {
let mut map = Vec::new();
Expand Down
28 changes: 0 additions & 28 deletions 2022/day17-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ type Play interface {
}

type RockHorizontal struct {
/*
>####
^
*/
col int
row int
}
Expand Down Expand Up @@ -96,12 +92,6 @@ func (r *RockHorizontal) Down(t *Tunnel) bool {
}

type RockPlus struct {
/*
#
>###
#
^
*/
col int
row int
}
Expand Down Expand Up @@ -171,12 +161,6 @@ func (r *RockPlus) Down(t *Tunnel) bool {
}

type RockL struct {
/*
#
#
###<
^
*/
col int
row int
}
Expand Down Expand Up @@ -248,13 +232,6 @@ func (r *RockL) Down(t *Tunnel) bool {
}

type RockVertical struct {
/*
#
#
#
#<
^
*/
col int
row int
}
Expand Down Expand Up @@ -325,11 +302,6 @@ func (r *RockVertical) Down(t *Tunnel) bool {
}

type RockSquare struct {
/*
##
>##
^
*/
col int
row int
}
Expand Down
6 changes: 0 additions & 6 deletions 2022/day25-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ func toInt(s string) int {
return sum
}

/*
4890
2
12
62
*/
func toSnafu(pow, target, current int, s []rune) (int, []rune) {
n := 2*int(math.Pow(5, float64(pow))) + current
s = append(s, '2')
Expand Down

0 comments on commit 6f22a74

Please sign in to comment.