Solutions to tasks.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Martins Eglitis 75b1a9d4af Minor task updates 2 months ago
go Minor task updates 2 months ago
.gitignore Remove hidden files 5 months ago Moved all go files to the root dir 5 months ago
main.go Addind descriptions 5 months ago


Solutions to tasks.

Notes on Go track

  • acronym - has some regexp that might be handy sometime.
  • bank-account - super important, using synchronization primitives like mutexes.
  • clock - interesting that test cases used reflect.DeepEqual, task around time.
  • flatten-array - super important, using raw interfaces.
  • grains - working with bits.
  • hamming - careful with UTF strings! When you do for i := range someString you are doing right and getting separate code points, but don't do someString[i] because it will get you the byte, not the rune. You can convert before like []rune(someString).
  • matrix - very interesting, matrix parsing.
  • parallel-letter-frequency - concurrency related, important. NOT WORKING, tests failing due to goroutines finishing randomly!
  • reverse-string - although initially simple task, beware of using len vs range on strings, because they might be UTF encoded. len returns the number of bytes, while range iterates over the code points.
  • robot-name - tests are using the -tags flag, which makes more tests to run. Don't forget to initialize channels with make instead of just defining e.g. var ch chan int. Be careful.
  • run-length-encoding - it was easy by design but took some time, all those nitty-gritty things.
  • sublist - easy, but I think I cheated.
  • tournament - custom sorting and output formatting.
  • tree-building - interesting exercise, building any tree.
  • twelve-days - recursion, was fun.