Day 13: Distress Signal

Day 13 involves parsing and comparing nested lists according to specific rules.

Problem Overview

You're trying to decode a distress signal consisting of pairs of packets, where each packet is a nested list structure. Your task is to:

  1. Determine which pairs of packets are in the right order according to specific comparison rules
  2. Sort all packets, including two divider packets, and find the decoder key

This problem tests your ability to parse and compare hierarchical data structures with complex comparison rules.