Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Advent of Code Day 2 Part 1 and 2

A coding contest held in the month of December according to the Advent Calendar. Just giving it a try.

Part 1

Need to sum all the days where the given constraint holds: Which games would have been possible if the bag contained only 12 red cubes, 13 green cubes, and 14 blue cubes? (ans) contains that.

Used a dictionary for the constraint. (mydict) Set a variable to check if the constraint holds or not on a given day. (see)

Learnt file handling(properly) and new functions.

Part 2

Constraint: In each game you played, what is the fewest number of cubes of each color that could have been in the bag to make the game possible? We just make a dictionary where each key(color) holds the maximum number of balls across all events in a game

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages