Cognizant OA – Questions & Sections
You are given two arrays representing the start time and end time of employees.
An employee can interact with another employee if their working/available time intervals overlap.
The task is to determine the maximum possible team size, i.e., the maximum number of employees whose intervals overlap at the same time.
Concepts involved:
Arrays Intervals Sorting Sweep line / Event-based approach Maximum overlapping intervals 2. React + TypeScript – Expense Tracker
You have to build an Expense Tracker application using React and TypeScript.
The application included functionality such as:
Adding an expense using an Add button. Updating the total expense when a new expense is added. Handling user input for expenses. Updating the UI/state dynamically after adding an expense. Implementing the required functionality in the provided React/TypeScript code.
There were around 2–3 main functionalities that had to be implemented.
Concepts involved:
React TypeScript useState Event handling Form/input handling Updating calculated values Component state 3. Python – RAG / Validator Function
There was a Python-based question related to RAG (Retrieval-Augmented Generation).
You were provided with two functions, and you had to complete/implement the required validator function.
The question was related to validating the output/input involved in the RAG pipeline.
The section tested both:
Python programming/DSA fundamentals Understanding of how to build or work with a basic RAG pipeline
Concepts involved:
Python Functions Validation RAG Retrieval-Augmented Generation Basic RAG pipeline concepts
If you are comfortable solving DSA problems in Python, the coding portion should be manageable. It is also useful to understand the basic flow of a RAG pipeline.
There were approximately 15 MCQs based on System Design.
The questions were relatively easy and aimed at a beginner level.
Most questions presented a simple scenario and asked which design/technology/approach would be the right choice.
The questions focused more on understanding basic system-design concepts and making the appropriate choice for a given scenario rather than advanced system design.
Level: Beginner / Easy
Topics included broadly:
Basic system design Choosing appropriate components Scenario-based questions Scalability/basic architecture concepts Appropriate technology/design choices 5. Prompt Writing
There was also a prompt-writing question.
You were given a scenario and had to write an appropriate prompt for the given task.
The section tested your ability to:
Understand the given requirement Structure a clear prompt Give appropriate instructions/context Specify the expected output
A useful way to prepare for this section is to practice writing prompts with: Role + Context + Task + Constraints + Expected Output.
There was also a ~20-minute YouTube video that can help with understanding this type of question and preparing for the section.