Skip to content

kc8/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2020

I started with Python but might switch to C#. My goal is to spend 1 - 1.5 hours on the problem and then move on. In some cases a brute force answer is all I am really looking for.

I'll try to sum up each day below. I am also not looking to use the more 'advanced' data structures within the language and instead would rather have a brute force solution.

Day 1

My answer uses somethiwng like n^3. I think a better solution might be to get the complment and do some checking of the numbers that way we can skip going through the entire list multiple times as this would get slow. Another idea would be to sort the list throwing out numbers that are to large and to small.

Day 2

Created a class for the password and kept track of whether it was valid within the class. Could do a better job of sperating out parsing the input better

Day 3

Was able to do the first part, second part I left incomplete. I think the "Right 1, down 2" needs to be checked but not sure.

Day 4

Counted the ':' and just checked if the line had 'cid'. Could most likely use less looping by cleaing the input better. Did not feel like doing part II.

Day 5

Finsished on day after. Wanted to figure it out with a 'midpoint formula' solution but figured out the binary solution instead. Second part was just sorting and seeing the missing value?

Day 6

Used to many loops. Knowing more Python would probably reduce the amount of loops and such.

Day 7

Started but did not finish. Looks like a recusion problem. Switched over to C# instead of Python.

Day 8

Finsihed part I, did not start part II.

Releases

No releases published

Packages

No packages published