Skip to main content
2 of 3
added 45 characters in body
emanresu A
  • 44.4k
  • 5
  • 101
  • 240

Jelly, 8 bytes

=TḢɗÐƤ¹Ƈ

Try it online!

Returns values 1-indexed. Tack on a for 0-indexed values. Port of my Vyxal answer.

    ÐƤ    Map over the suffixes...
---ɗ      Collect three links as a dyad...
 T        Indices where
=         Input equals each value
  Ḣ       Find the first such index
      ¹Ƈ  Filter out zeroes
emanresu A
  • 44.4k
  • 5
  • 101
  • 240