Skip to content

Instantly share code, notes, and snippets.

@nik-don
Last active April 26, 2023 16:48
Show Gist options
  • Save nik-don/43f13462c240bc10ae3586df04ef5f4e to your computer and use it in GitHub Desktop.
Save nik-don/43f13462c240bc10ae3586df04ef5f4e to your computer and use it in GitHub Desktop.
coding-challenge

Tips

  • Importing packages: Make sure you're familiar with importing packages such as strconv for type conversions and math for mathematical operations.

  • Type Conversions: Practice using strconv to convert between different types, such as strings and integers.

  • Math functions: Get comfortable with various math functions like square roots, rounding down with math.Floor, or rounding to the nearest integer using math.Round.

  • String Manipulation: Practice string manipulation techniques to handle and process strings effectively.

  • Slices: You may need to work with slices of integers ([]int) or strings ([]string). Remember how to create, access, and manipulate them.

  • Sorting: Be prepared to sort slices using the sort package if required.

  • Maps: Maps can be extremely useful, so practice working with them and combining them with slices when necessary.

  • Map Key Lookup: To look up a key from a map in Go, use the following syntax: value, exists := myMap[key].

  • Loops: Ensure you're familiar with the syntax for different loop structures, such as for loops and range loops.

  • Reverse Iteration: Remember how to iterate through a collection in reverse order.

  • Modulus Operator: The modulus operator % can be quite useful, so make sure you know how to apply it in various situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment