I keep my data structures and algorithms book on the shelf - it was printed 15 years ago and uses Java, but it's easy enough to implement in something else. I used to restudy it every few years, for interviews. You need to be ready to do tree traversal, detect cycles in lists, sort and search, create a hash, find shortest paths in graphs.
I go back and forth on whether I'd do this again. I can't say never, because a good enough job might be worth the effort and risk, but I'm hesitant. How many times in life do you want to retake your undergraduate data structures and algorithms exam? I would outright refuse to do a lengthy "homework assignment". I've done that once (7-8 hours recommended time), sent it in, crickets chirping, and a one line brush off from a recruiter a full month later. I'm actually embarrassed to admit I even did this once.
As an aside, while I generally take a dim view of professional licensing, I wouldn't mind taking a "bar exam" for software development if (big if) it were well designed and administered, and perhaps voluntary to avoid regulatory capture. The reason is, I wouldn't mind studying a hundred hours or more for this test if it was widely respected and meant I wouldn't have to keep re-taking it every time I interview.