IBM Coding Assessment 2 - On campus
- Posted
- 10 Sept 2026
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)
- 01
Find Strictly Increasing Contiguous Slope of Size K
Data Structures & Algorithms
Given an integer array
yCoordinateswhereyCoordinates[i]represents the Y‑coordinate at X‑coordinatei. Find the number of strictly increasing contiguous sub‑arrays (slopes) of length exactlyK.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: 2Possible increasing slopes of length 3 are:
- (1,5), (2,7), (3,8)
- (4,3), (5,5), (6,6)
Constraints
1 <= yCoordinates.size() <= 10^5yCoordinates[i] >= 1