/advent-of-code-go-py-cpp

implement advent of code problems in golang, python, and C++

Primary LanguageC++

advent-of-code-go-py-cpp

implement advent of code problems in golang, python, and C++

Summary

Day 01

  • Goal: Find elements in array which sum to 2020.
  • Implementation: Find the intersection of the set of numbers and the set of numbers subtracted from 2020.

Day 02

  • Goal: Given parameters, determine whether a string password is valid.
  • Implementation: Sum the output of a "parsing" function which return 1 if input is valid.

Day 03

  • Goal: Diagonally parse through 2D array to find "tree" characters.
  • Implementation: Reset the left-to-right search position by using a modular function.

Day 04

  • Goal: Given items, determine whether they meet various ID requirements.
  • Implementation: Put items into a dictionary/map structure; evaluate each key-pair value.

Day 05

  • Goal: Binary space partitioning seat positions; find which seat is unoccupied.
  • Implementation: Sort the occupied seat numbers, find the missing, nonconsecutive seat number. C++ note: integer division yields the integer sfloor of the output (not rounded or converted to float)