/codetask-Go

Programming tasks using Go

Primary LanguageGo

Programming Tasks in Go

This is a challenge to complete one (or more if I'm feeling good about myself) programming task(s) a day, but the catch is that I can only do it in Go. I have never used Go before this, so I'm doing this in hopes of getting fluent at it eventually. As I complete tasks, I will note down the things I've learnt in this README together with the date of completion to track progress.

Why I'm learning Go

  1. great for web development
  2. statically typed
  3. no excessive boilerplate code unlike Ruby
  4. Fast compile times

Tasks complete:

  • 100doors (27/4/2020): Basic syntax and for loop
  • A + B (28/4/2020): Initialise functions
  • gpa (28/4/2020): Set precision of standard output float
  • descsort (28/4/2020): Sorting an array, using comparator functions to determine sorting sequence
  • standardshapes (29/4/2020): OOP, composition by embedding structs, pointers to set object values
  • gcd (29/4/2020): Recursion
  • guessthenumber (30/4/2020): Binary search
  • reversestring (no additional memory) (30/4/2020): Converting strings into mutable byte arrays
  • reversedlinkedlist (1/5/2020): Linked lists, pointers, methods
  • knightsdialler (2/5/2020): 2D slices, matrix multiplication
  • lioddevensubseq (3/5/2020): Dynamic programming
  • lcs (3/5/2020): Dynamic programming, slices, using range to iterate over elements in arrays
  • quicksort (3/5/2020): Quick sort, appending to and making copies of arrays, reading from files, converting str to int
  • training (4/5/2020) (Google Kick Start 2019 Round A): Dynamic programming, clearing arrays
  • buildingpalindromes (4/5/2020) (Google Kick Start 2019 Round B): Slicing arrays
  • simplifyfrac (4/5/2020): Recursion
  • card (5/5/2020) (NOI 2010): Append, make, copy functions for slices
  • aryaandthegreatwar (5/5/2020): Bitwise operators
  • deletewithoutheadpointer (5/5/2020): Linked list, pointers
  • bitdifference (5/5/2020): Brian Kernighan's Algorithm
  • hole (5/5/2020) (NOI 2007): DFS
  • extraelement (6/5/2020): Binary search across 2 arrays
  • vesakday (7/5/2020) (BBCS2020 Competition Submission): Dynamic programming
  • coins (8/5/2020): Greedy
  • dfs (9/5/2020): Graph theory, depth first search, adjacency list
  • knapsack (10/5/2020): Knapsack, dynamic programming
  • fizzbuzz (11/5/2020) (but in 2 minutes): Speed
  • minswaps (12/5/2020): Sorting an array of structs, graph theory
  • frogs (13/5/2020) (CodeChef DSA Contest 7): Sorting an array of structs
  • brackets (14/5/2020): Stack
  • binarycoins (15/5/2020): Least significant bit
  • marbles (16/5/2020): Greedy, binary search
  • countdown (17/5/2020) (Google Kick Start 2020 Round C): Running count

Ambitious problems I'll come back to after learning more:

  • travellingsalesman