Skip to content

Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar.

License

Notifications You must be signed in to change notification settings

jabrena/advent-of-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of code collection

Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar.

Java CI

SonarQube Cloud

Cloud IDEs

Open in GitHub Codespaces

Open in Gitpod

Benefits solving AOC problems

  • Improve Java programming skills: Master modern Java features (Java 25), SOLID principles, Effective Java best practices, and clean code techniques

  • Functional Programming & Design:

    • Sealed Interfaces & ADTs: Type-safe algebraic data types for pattern matching (e.g., Trampoline, Instruction)
    • Records: Immutable data carriers for state representation (e.g., ProgramState, RemovalState, MergeState)
    • Streams API: Declarative data transformations, Stream.iterate() for functional iteration, lazy evaluation
    • Pattern Matching: Switch expressions with sealed classes for exhaustive type checking
    • Trampoline Pattern: Converting deep recursion to iteration, preventing stack overflow
    • Pure Functions: Side-effect-free transformations, immutable data structures
    • Higher-Order Functions: Function composition, method references, lambda expressions
  • Data Oriented Programming (DOP):

    • Code-Data Separation: Instructions as data structures, execution logic separated from instruction representation
    • Generic Data Structures: Flexible, reusable data representations (e.g., generic Trampoline<T>)
    • Immutable Data: Records and sealed interfaces ensure data integrity
    • Pure Data Manipulation: Transformations through pure functions, explicit data flow
    • Flat Data Models: Denormalized structures for efficient processing
  • Algorithms & Data Structures:

    • Graph Algorithms: BFS (Breadth-First Search), DFS (Depth-First Search), Dijkstra's shortest path, A* pathfinding with heuristics
    • Dynamic Programming: Memoization for overlapping subproblems, optimal substructure exploitation
    • Backtracking: Recursive search with pruning, constraint satisfaction
    • State Space Search: BFS/DFS for exploring solution spaces (e.g., elevator puzzles, game states)
    • Range Algorithms: Range merging, interval operations, coverage calculations
    • Tree Traversal: File system navigation, hierarchical data processing
    • String Algorithms: Pattern matching, parsing, validation, hash generation
    • Grid Algorithms: 2D matrix manipulation, neighbor checking, cellular automata, pathfinding in grids
    • Optimization Techniques: Big O analysis, complexity optimization, space-time tradeoffs

References

Acknowledgements

A heartfelt thanks to ChatGPT and Gemini for the insightful early morning (6:00 AM) discussions on design thinking and code refactoring, with a focus on functional approaches. I'm also deeply grateful to my friend Juan Antonio Medina for the continuous and inspiring conversations throughout the day, and to Rene van Putten for their invaluable inspiration.

About

Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •