KLA | 4+ YOE | Chennai | 1st round | DSA

Location
Chennai
Experience
4 years
Posted
15 Apr 2025
317 reads

Summary

I interviewed for a programming round at KLA in Chennai, focusing on Data Structures and Algorithms. The round involved solving three specific problems on a HackerRank portal.

How it went

Recuriter reached out to me through naukri. 1st round was programming round. Need to solve the presented problems on hackerrank portal(intellisence is available) and discuss the solution with the interviewer.

Questions asked (3)

  1. 01

    Absolute Difference of Alpha and Beta in Array

    Data Structures & Algorithms

    Given an array of positive integers, return the absolute difference between alpha and beta of the array.

    Alpha : No of times an element 'k' appears exactly 'k' consecutive times.
    Beta : No of times an element 'k' appears exactly 'k' consecutive times starting at index k. (1-based indexing)

    example:
    input: arr=[2,2,2,4,4,4,4,3,3,3,2,2]
    output: 2 (|3-1|)

    Aplha - 3 (3 instances - 4,3,2)
    Beta - 1 (only one instance - element 4 appears 4 times consecutively starting at index 4).

  2. 02

    Smallest Missing Number from Subsequence ORs

    Data Structures & Algorithms

    Given an array of whole numbers, Find the lowest whole number which is not present in the list of the whole numbers obtained by performing the bitwise OR operation on all of the subsequences of the array.

    example:
    input: [1,3,4,0]
    output: 2

    [0] => 0
    [4] => 4
    [4, 0] => 4
    [3] => 3
    [3, 0] => 3
    [3, 4] => 7
    [3, 4, 0] => 7
    [1] => 1
    [1, 0] => 1
    [1, 4] => 5
    [1, 4, 0] => 5
    [1, 3] => 3
    [1, 3, 0] => 3
    [1, 3, 4] => 7
    [1, 3, 4, 0] => 7

    2 is the smallest whole number which is not present in the result set.

  3. 03

    Minimum Transfers to Measure X Liters

    Data Structures & Algorithms

    Given n jars with capacity of [c1,c2....cn] liters, and each jar containing intial water of [i1,i2....in] liters, Find the minimum no of transfers required to measure 'X' liters of water.

    constraints:
    2<= n <=4
    (output) min no of transfers required <= 6

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Kla recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!