i
Cognizant
Filter interviews by
SQL query to find the second highest salary from a table of employees.
Use the 'DISTINCT' keyword to avoid duplicate salaries.
Use 'ORDER BY' clause to sort salaries in descending order.
Use 'LIMIT' or 'OFFSET' to skip the highest salary and fetch the second.
Example SQL: 'SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET 1;'
This program calculates the sum of the digits of a given integer number.
Convert the number to a string to iterate through each digit.
Initialize a sum variable to zero.
For each character in the string, convert it back to an integer and add it to the sum.
Return or print the final sum.
The Fibonacci series is a sequence where each number is the sum of the two preceding ones, starting from 0 and 1.
The Fibonacci series starts with 0 and 1.
The next number is found by adding up the two numbers before it.
Example: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...
A simple implementation can be done using recursion or iteration.
In Python, you can use a loop or a recursive function to generate the series.
This program reverses an array of strings by swapping elements from both ends towards the center.
Define a function that takes an array of strings as input.
Use a loop to swap elements from the start and end of the array.
Continue swapping until the middle of the array is reached.
Example: Input: ['apple', 'banana', 'cherry'], Output: ['cherry', 'banana', 'apple'].
What people are saying about Cognizant
Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and methods.
Encapsulation: Bundling data and methods that operate on the data within one unit (e.g., a class).
Inheritance: Mechanism to create a new class using properties and methods of an existing class (e.g., a 'Dog' class inheriting from an 'Animal' class).
Polymorphism: Ability to present the sam...
A queue is a linear data structure that follows the First In First Out (FIFO) principle for managing elements.
A queue can be implemented using arrays or linked lists.
In an array-based implementation, maintain two pointers: front and rear.
Enqueue operation adds an element at the rear, while dequeue removes from the front.
Example: Enqueue 'A', 'B', 'C' results in queue: ['A', 'B', 'C']. Dequeue removes 'A', resultin...
Abstraction in Java is the concept of hiding the implementation details and showing only the necessary features of an object.
Abstraction allows programmers to focus on what an object does instead of how it does it.
It helps in reducing complexity and improving the efficiency of the code.
In Java, abstraction is achieved through abstract classes and interfaces.
Example: Animal is an abstract class with abstract method...
Recursion is a programming technique where a function calls itself to solve a problem.
Recursion involves breaking down a problem into smaller subproblems and calling the function recursively to solve them.
Each recursive call works on a smaller input until a base case is reached to stop the recursion.
Example: Factorial calculation, Fibonacci sequence, tree traversal.
OOPS concepts refer to Object-Oriented Programming concepts which include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implement...
Our framework is a robust and flexible tool that streamlines development processes and enhances code reusability.
Modular architecture allows for easy customization and scalability
Built-in libraries and utilities simplify common tasks
Support for various programming languages and platforms
Example: Using MVC architecture for organizing code and separating concerns
I applied via Campus Placement
Medium Level leetcode questions.
I am a skilled Programmer Analyst with experience in developing and maintaining software applications.
Proficient in programming languages such as Java, C++, and Python
Strong analytical and problem-solving skills
Experience in database management and system integration
Ability to work well in a team environment and communicate effectively with stakeholders
I applied via Campus Placement and was interviewed in Oct 2024. There were 2 interview rounds.
Basic Aptitude Questions
Basic apti questions
4 question based on dsa. Two easy and two difficult
A queue is a linear data structure that follows the First In First Out (FIFO) principle for managing elements.
A queue can be implemented using arrays or linked lists.
In an array-based implementation, maintain two pointers: front and rear.
Enqueue operation adds an element at the rear, while dequeue removes from the front.
Example: Enqueue 'A', 'B', 'C' results in queue: ['A', 'B', 'C']. Dequeue removes 'A', resulting in ...
I applied via Campus Placement and was interviewed in Sep 2024. There were 2 interview rounds.
SQL,Python,C,C#,Dotnet
Coding challenge with respect to what is mentioned in resume
I applied via Job Portal and was interviewed in Apr 2024. There were 3 interview rounds.
Coding questions specially based on your technical skills.
Developed a web-based inventory management system for a local bookstore as part of my Bachelor's degree project.
Designed a user-friendly interface using HTML, CSS, and JavaScript.
Implemented a backend using PHP and MySQL for data storage and retrieval.
Conducted user testing with bookstore staff to gather feedback and improve functionality.
Integrated features like search, add, update, and delete for managing inventory.
D...
I applied via Approached by Company and was interviewed in Dec 2024. There were 2 interview rounds.
There were questions related to reasoning, English, aptitude, and mathematics.
Coding round with 4/5 codes were there
I appeared for an interview in Jan 2025.
Oops,dsa,sql,30min,easy,hackerrank
Group,discussion,coding,java,ml,dsa
I applied via Naukri.com and was interviewed in Jul 2024. There were 2 interview rounds.
Intutive and immersive topic asked was about co2 emission
Algebraic questions and IQ
I applied via Naukri.com and was interviewed in Apr 2024. There were 3 interview rounds.
Frequency of strings
Abstract class is a class that cannot be instantiated and may contain abstract methods.
Cannot be instantiated directly
May contain abstract methods that must be implemented by subclasses
Can have both abstract and non-abstract methods
Used for creating a template for other classes to inherit from
Exception handling is a programming concept that deals with errors and unexpected events in a program.
Exception handling allows programmers to gracefully handle errors and prevent program crashes.
It involves using try, catch, and finally blocks to handle exceptions.
Examples of exceptions include divide by zero, file not found, and out of memory errors.
Arrays are fixed in size and store elements of the same data type, while lists can dynamically resize and store elements of different data types.
Arrays have a fixed size, while lists can dynamically resize.
Arrays store elements of the same data type, while lists can store elements of different data types.
Arrays use contiguous memory allocation, while lists use linked data structures.
Arrays are accessed by index, while ...
I applied via LinkedIn and was interviewed in Apr 2024. There were 3 interview rounds.
Aptitude test 2 hours
Code logic for a specific function
Identify the input parameters required for the function
Define the steps needed to achieve the desired output
Consider edge cases and error handling
Test the function with different inputs to ensure correctness
Some of the top questions asked at the Cognizant Programmer Analyst interview for experienced candidates -
The duration of Cognizant Programmer Analyst interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 78 interview experiences
Difficulty level
Duration
based on 5.8k reviews
Rating in categories
Associate
73.2k
salaries
| ₹5.1 L/yr - ₹14.5 L/yr |
Programmer Analyst
56.2k
salaries
| ₹2 L/yr - ₹9.3 L/yr |
Senior Associate
55.1k
salaries
| ₹8.4 L/yr - ₹28.5 L/yr |
Senior Processing Executive
29.8k
salaries
| ₹1.4 L/yr - ₹6.5 L/yr |
Technical Lead
18.1k
salaries
| ₹6 L/yr - ₹25.6 L/yr |
TCS
Infosys
Wipro
Accenture