Company: Denso oa
Difficulty: medium
Simulation of card movement on a 2D grid Given an application that organizes information by arranging cards with notes on them into lists on a two-dimensional grid. These notes can be moved across multiple lists. Examples include billboard-based task management applications such as Trello or Jira . Input Format The function takes three arguments: cards : A two-dimensional array representing the initial position of cards: [CardID, RowIndex, ColumnIndex] Row and column indexes are zero-based. moves : A two-dimensional array representing card movements: [CardID, Row index before move, Column index before move, Destination row index, Destination column index] All indexes are zero-based and assumed valid. query : An integer representing the ID of the card to track. Output Format Return an array [row index, column index] representing the final position of the queried card. Movement Rules When a card is moved and there is a card at the destination, the existing card is moved down one row. Whe