Walmart Interview Question

Q1: Range query, segment tree based Q2: reverse a part of linked list