Finally solved 2021 day 19
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user