JobsJob TrackerJob alerts

Cashfree ยท 10 questions

All 10Coding 6System Design 1Low-Level Design 1
  • Lexicographically Smallest String and Find DuplicatesCoding
  • HashMap, Greedy, DFS, and Array Queries Online AssessmentCoding
  • Database Query Optimization and Core Computer Science
  • ACID Properties, Joins, and LRU Cache ImplementationLow-Level Design
  • Print all combinations of balanced parenthesesCoding
  • Student report card database design and CS conceptsSystem Design
  • Find K Closest ElementsCoding
  • Flatten a Deeply Nested ArrayCoding
  • Maximize distinct elements and Minimize array costCoding
  • DBMS, OS, and CN Discussion
โ† Cashfree questions
  1. Interview questions
  2. Cashfree
  3. Maximize distinct elements and Minimize array cost
Coding

Maximize distinct elements and Minimize array cost

Filed under Cashfree

The question

Given two arrays, maximize distinct elements in A after k swaps. Also, find a permutation of array A that minimizes the sum of costs (distinct elements to the left).

No write-up yet. Related questions below have one.

Related Cashfree questions

  • Lexicographically Smallest String and Find Duplicates
  • HashMap, Greedy, DFS, and Array Queries Online Assessment
  • Flatten a Deeply Nested Array
โ† Flatten a Deeply Nested ArrayDBMS, OS, and CN Discussion โ†’

Collected from public candidate posts and coding forums. Updated Nov 2026.