Skip to content

trohat/AdventOfCode2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2018

Codes from Christmas coding event.

Useful functionalities:

  • Array.prototype.sum - day 1

  • test for counting characters in a string - speed testing

  • String.prototype.countChar (winner of speed testing) - speed testing

  • String.prototype.setCharAt - day 3, day 4

  • Array.prototype.countChar - day 3, day 4, day 6

  • String.prototype.isLower (isupper in Python) - day 5

  • String.prototype.isUpper (islower in Python) - day 5

  • String.prototype.react (delete two characters from a string) - day 5

  • String.prototype.dispose (delete one character from a string) - day 5

  • ord, chr (same as in Python and PHP) - day 6

  • countManhattan (counts Manhattan distance) - day 6 and much more in day 23

  • Array.from({length:players}).map(x => 0) (creating array of zeroes) - day 9

  • Array.prototype.intersection (intersection of arrays) - day 16

  • different sorting functions - day 24