Which algorithm does express uses when matching route paths

Here is the link to the topic
https://www.codecademy.com/courses/learn-express/lessons/learn-express-routes/exercises/matching-route-paths

It clearly explains that when we create a GET request to '/expressions/ then it will check the first path that is written ‘another-route/’ in code then it goes to the next one '/expressions/.

From that I can assume that it uses linear search to match the path

Is that true that the search is linear or does express uses some different data structure on the backend to math the requests quickly?