IBM Coding Assessment 2 - On campus

Posted
10 Sept 2026
375 reads

Summary

I took the second coding assessment for an on‑campus interview at IBM, which included a problem about finding strictly increasing contiguous slopes of size K and a framework bug‑fixing task.

How it went

This is the second coding assessment after shortlisted from OA

1.)Given an integer array named yCoordinates where yCoordinates[i] represents the Y axis and each index represents the X axis. Find the strictly increasing contiguous slope of the give points of size exactly K.

Example: Input:

[6,5,7,8,3,5,6] and k=3

The points are (0,6),(1,5),(2,7),(3,8),(4,3),(5,5),(6,6)

output : 2

Possible increasing slopes are: (1,5),(2,7),(3,8) (4,3)(5,5),(6,6)

constraints: 1<=yCoordinates.size()<=10^5; yCoorinates[i]>=1

2.) This is a framework based questions we are allowed to pick the framework such as Node.js,Spring boot or Django.The code repository is given to us where we need to resolve the bugs in that and total test cases of 8 was given to us. No AI tool is incorporated.

Questions asked (1)

  1. 01

    Find Strictly Increasing Contiguous Slope of Size K

    Data Structures & Algorithms

    Given an integer array yCoordinates where yCoordinates[i] represents the Y‑coordinate at X‑coordinate i. Find the number of strictly increasing contiguous sub‑arrays (slopes) of length exactly K.

    Example

    Input:  yCoordinates = [6,5,7,8,3,5,6], K = 3
    Points: (0,6), (1,5), (2,7), (3,8), (4,3), (5,5), (6,6)
    Output: 2
    

    Possible increasing slopes of length 3 are:

    • (1,5), (2,7), (3,8)
    • (4,3), (5,5), (6,6)

    Constraints

    • 1 <= yCoordinates.size() <= 10^5
    • yCoordinates[i] >= 1

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at IBM 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!