The Advent of Code Day 7 challenge is easily solvable in pure TensorFlow with the help of ragged tensors and a couple of observations that simplify the problem.
Here’s my article on how I solved the puzzle

  
      

      P. Galeone's blog
  

  
    

Advent of Code 2021 in pure TensorFlow - day 7 5

  The day 7 challenge is easily solvable with the help of the TensorFlow ragged tensors. In this article, we'll solve the puzzle while learning what ragged tensors are and how to use them.