How to do a DFS in hashmap?

In the explanation video, DFS is recommended once we reach the end of the input query, how to perform DFS in tries?

@goyalvivek the normal traversal for tries is DFS only as you are traversing the depth first (to make a word)