Ganesh Chaturthi Special Discount is Live!

Get Festive Discount
  • Company: Spotnana
  • Location: Bangalore
  • Experience: 11
  • Interview Date: 2026-06-30

Round 1 : DSA Round

  • First round dsa: leetcode LC hard LC-410 different words used https://leetcode.com/problems/split-array-largest-sum/

Round 2 : DSA Round

  • Duplicate in string using char array lowercase v? find whether there are any duplicates in a string using a character array (specifically for lowercase letters), the most efficient approach is to use a frequency array (also known as a counting sort technique). Since there are only 26 lowercase English letters, a fixed-size array of size 26 is sufficient. Improve space complexity for above. Final answer using bit OR
  • Problem: The Great Key Exchange There are N people, each holding one specific lock and one specific key. A lock labeled Xcan only be opened by a key labeled X. Friends can share keys freely among themselves. Friendship is transitive: if A is friends with B, and B is friends with C, then A and C can share keys. Given a list of friendship pairs, calculate the maximum number of locks that can be opened after all possible key exchanges within connected groups. Input Format: n: An integer representing the number of people. keys: An array of size n, where keys[i] is the key held by person i. locks: An array of size n, where locks[i] is the lock held by person i. friendships: A 2D array of size m times 2, representing pairs of friends. Constraints: 1 <= n <= 10^5 1 <= m <= 10^5 1 <= key/lock labels <=10^9 Sample Test Case Input: Plaintext n = 4 keys = [1, 2, 1, 3] locks = [2, 1, 3, 2] friendships = [[0, 1], [2, 3]] Explanation: Group 1 (People 0 and 1): * They have keys: {1, 2}. They have locks: {2, 1}. Since they have keys 1 and 2, they can open both locks. (2 locks opened) Group 2 (People 2 and 3): They have keys: {1, 3}. They have locks: {3, 2}. They have key 3 to open lock 3, but no key 2. (1 lock opened) Output: Plaintext 3

Please take a moment to share your interview experience. Every experience helps thousands of aspirants prepare better, and your contribution plays a vital role in helping our community grow. ❤️

WhatsApp Icon