menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Advent of ...
source image

Dev

17h

read

195

img
dot

Image Credit: Dev

Advent of Code 2024 - Day 23: LAN Party

  • Advent of Code 2024 - Day 23: LAN Party
  • Today's challenge was rather run, and somewhat simple (or at least Part 1 was).
  • Collect all the connections in trios where any of the triangles computers begin with t.
  • To achieve this we create a mapping of node -> connections (neighbors).
  • On part 2 we need to find the largest set of inter-connected computers.
  • The Bron-Kerbosch algorithm is used to find the largest groups (called cliques) in a graph.
  • Finding the largest clique by brute force (trying every possible group) is slow for large inputs.
  • The Bron-Kerbosch algorithm makes this process faster by:
  • Starting with smaller groups (subsets) and expanding them.
  • Stopping early when a group can’t grow into a larger clique.

Read Full Article

like

11 Likes

For uninterrupted reading, download the app