Finally solved 2021 day 19

This commit is contained in:
2021-12-30 07:41:24 -06:00
parent 586ec1330e
commit ca626cc0f2
5 changed files with 187 additions and 467 deletions

View File

@@ -182,12 +182,16 @@ func FileToBytes(fn string) []byte {
// PrintProgress is for outputting a progress bar
func PrintProgress(curr, total int) {
pct := int(float64(curr)/float64(total)) * 100
pct := int(float64(curr) / float64(total) * 100)
fmt.Print("[")
for i := 0; i < 100; i += 10 {
if pct > i {
fmt.Print(FILL_CHAR)
} else {
fmt.Print(" ")
}
}
fmt.Print("]")
}
// StringPermutations takes a string and returns all permutations of it