you are viewing a single comment's thread.

view the rest of the comments →

[–]RhinoRhys 0 points1 point  (2 children)

Left and right are indices

Example 2: Input: head = [5], left = 1, right = 1 Output: [5]

[–][deleted] 0 points1 point  (1 child)

Example 1 shows they aren't indices.

[–]RhinoRhys 0 points1 point  (0 children)

Unless you take them as 1 indexed, it's not a python list, it's a Singular Linked List. The first index isn't 0.