Company: ZS_14oct
Difficulty: medium
Problem Description You are tasked with sorting a two-dimensional array of integers based on one or more columns using Python's built-in sorting mechanisms. Implement the indexSort(arr, indices) function to perform the requested sorting operations. You are expected to achieve this by leveraging Python's built-in list.sort() method with a custom lambda expression. You are provided with a list of sorting instructions indices , where each instruction is a pair in the format [column_index, sort_direction] . The sort_direction is 0 for ascending and 1 for descending. The sort should be applied such that the first instruction in the list is the primary sort key, the second instruction is the secondary sort key (used to break ties in the primary key), and so on. Note: The sort must be stable. In the event of a tie across all provided sort criteria, the original relative order of the elements must be preserved. Input arr : A 2D list of integers of size n × m . indices : A 2D list of inte