THE MAP SO FAR
The creates one Solution object, calls one method with each test’s arguments, and compares the value the method returns with the expected answer. Anything you print appears in the console and plays no part in the verdict.
On your own machine, a local harness does the judge’s job with assert. Linked lists and trees arrive as ListNode and TreeNode objects, two small classes LeetCode defines, and helper functions live inside the method.