Sample Technical Questions

Sample Technical Questions

Consecutive Numbers in an Array

This is a great question to assess programming skills. It’s recommended as a quick first interview question or a warm-up exercise.

The Question:
Find the largest chain of consecutive repeated numbers in an array. Report both the size of the largest chain and the number that forms it.

Example:
You can use any sequence, but here’s a suggested one:

1111221111333333344

You can also use letters if you prefer.
In this example, there is a total of eight 1s, but the longest consecutive chain is seven 3s.


Why This Question?

There are multiple ways to solve this, but the simplest approach uses three variables:

  • longestChain

  • currentChain

  • currentChar

Algorithm:

  • Loop through the array with a for loop.

  • If the current number equals the previous one, increment the counter.

  • If not:

    • Compare the current chain length to the longest chain.

    • Update the longest chain if necessary.

    • Reset the counter for the new number.

Some candidates may try to use a hash map or dictionary. While this shows they know data structures, a dictionary will only return the total count of each number (e.g., eight 1s), not the longest consecutive chain.


What to Look For

This question is useful to observe:

  • How long it takes to solve.

  • How the candidate approaches the problem.

  • Whether they choose a simple solution or overcomplicate it.

 

Wave Tracking Example

Scenario:
We provide an image or video of a water drop creating waves. The question:
How fast is the wave moving?

image-20260109-192821.png

 

(VIDEO)

This question is primarily for candidates with computer vision skills, but it can be asked to anyone to see how they approach the problem and what questions they ask.

Expected Questions from Candidate:

  • What is the pixel size or scale of the image?

  • What is the frame rate of the video?

Approach:

  • Depending on the requirements, they may need to apply image processing techniques to clean up the wave pattern.

  • Then, calculate displacement over time to estimate wave speed.

Why This Question?
It helps assess:

  • Problem-solving approach.

  • Ability to ask clarifying questions.

  • Familiarity with image processing and motion analysis.