Cognizant interview questions

Tech / SWE · 10 questions · last reported Dec 2025
Report an interview →

Browse 10 Cognizant interview questions for software engineering and software development interview preparation. Questions in this collection are tagged for new graduate roles. Explore the topics and stages below and filter the collection to plan your practice.

Interview stages in this collection
Onsite, Online assessment (OA)
Practice topics
arrays (5), coding (4), hashset (3), duplicates (2), java (2), strings (2), binary-search (1), dictionary (1)

Questions come from candidate contributions and online research. Reports reflect past experiences and do not guarantee what Cognizant will ask. Locked question details require points. Public examples below are free to read.

Read 3 free Cognizant interview question examples

Browse all Cognizant questions

10 questions

Free Cognizant interview question examples

Read the full problem statements and use the links to revisit or share a specific example.

Binary Search

Easy · Onsite · New graduate

In the technical interview, they asked me to write binary search from scratch. It wasn't a trick question, but they wanted clean code and the correct loop condition. After I wrote it, they asked a few basic Java and collection framework questions around the same time. The round felt beginner-friendly, but they were checking if I actually understood the logic instead of memorizing it.

Alternating Sequence

Easy · Online assessment (OA) · New graduate

The online coding round had a simple pattern-style question. They gave me a number n and asked me to print n values in an alternating even-odd sequence, like 2, 1, 4, 3, 6, 5 for n = 6. It was timed around 20 minutes, so the main thing was not overthinking it. I just had to generate pairs cleanly and stop exactly at n numbers.

Histogram Area

Hard · Online assessment (OA) · New graduate

The second coding question in the online round was harder than the first one. They asked me to find the largest rectangular area from a set of histogram bars. It was basically the classic largest rectangle in histogram problem, and the time limit was tighter than I expected. I used a stack-based approach because checking every pair of bars would've been too slow.