Preparing Cognizant interview topics helps candidates strengthen their understanding of aptitude, programming fundamentals, computer science concepts, and coding problems commonly asked in Cognizant hiring processes. These topics are useful for GenC, GenC Next, GenC Pro, Programmer Analyst, Software Engineer, and other technical roles.
- Includes interview-focused questions, aptitude practice, coding problems, and core Computer Science concepts.
- Helps prepare for the Online Assessment, Technical Interview, and HR Interview.
- Each topic is divided into Easy, Medium, and Hard sections, enabling structured learning and better interview preparation.
Arrays
An Array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. Practice Problem
- Rotate Array
- Reverse an Array
- Check if Array is Sorted
- Move All Zeros to End
- Largest Element in Array
- Find the Second Largest Element in an Array
- Print Alternate Elements of an Array
- Find the Sum of Elements in an Array
- Find the Index of an Element in an Array
- Count of smaller elements
- Element with Left Side Smaller and Right Side Greater
- Find the Missing Number in an Array
- Count the Zeros in an Array
- Sort Elements by Frequency
- Count Elements in Two Arrays
- Find Two Repeated Elements
- Elements in the Range
- Remove Minimum Elements
- Buildings Receiving Sunlight
- Last Duplicate Element in a Sorted Arrray
- Adding Array Elements
- Find the Average of an Array (Iterative and Recursive)
- Check Whether an Array Is a Subset of Another Array
- Cyclically Rotate an Array by One
- Rearrange Array Alternately
- Sum of Middle Elements of Two Sorted Arrays
- Find Duplicate Elements in an Array
- Intersection of Two Arrays
- Leaders in an Array
String
Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’.
- Reverse a String
- Non Repeating Character
- Sum of Numbers in a String
- Remove Character
- Remove Spaces
- Check for Binary
- Upper Case Conversion
- Count Substrings
- Remove Duplicates from a String
- Reverse Words in a String
- Find the Smallest and Largest Word in a String
- Find the Maximum Occurring Character in a String
- Check if a String Is a Palindrome
- Find Common Characters in Two Strings
- Check Whether Two Strings Are Anagrams
- Length of the Longest Valid Substring
- Convert Roman Numerals to Decimal
- Count Substrings That Start and End with 1
- Alternatively Merge two Strings in Java
- Most Frequent Word in an Array of Strings
- Alternate Lower Upper String Sort
- First Non-Repeating Character in a String
- Remove All Vowels from a String
- Longest Common Prefix Using Sorting
- Remove Consecutive Duplicate Characters
Searching and Sorting:
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored. Sorting Algorithms are used to rearrange a given array or list of elements according to a comparison operator on the elements. The comparison operator is used to decide the new order of elements in the respective data structure.
- Binary Search
- Linear Search
- Bubble Sort
- Insertion Sort
- Merge Sort
- Selection Sort
- Quick Sort
- Heap Sort
- Search Insert Position in a Sorted Array
- Find Ceiling in a Sorted Array
- Floor in a Sorted Array
- Find First and Last Occurrence in a Sorted Array
- Minimum Swaps to Sort an Array
- Rearrange Array Elements by Sign
Number Series
A sequence is an ordered list of numbers arranged according to a specific rule or pattern. A series, on the other hand, represents the sum of the terms of a given sequence.
- Odd Game
- Find the LCM of Two Numbers
- Check if a Number Is a Palindrome
- Armstrong Numbers
- Fibonacci numbers
- Primitive Abundant Number
- Perfect Number
- Sum of All Prime Numbers Between 1 and N
- Check Whether a Number Is Even or Odd
- Check Whether a Number Is Prime
- Check Whether a Year Is a Leap Year
- Factorial of a Number
- Sum of a Geometric Series
- Program for N-th term of Geometric Progression Series
- Automorphic Number
- Program to Find Area of a Circle
- Find All Divisors of a Natural Number
- Program to Find GCD or HCF of Two Numbers
- Round a Number to the Nearest Multiple of 10
- How to Swap Two Numbers Without Using a Temporary Variable
- Find the Largest Number Among Three Numbers
- Find Prime Numbers from 1 to N
Conversions
Conversions involves questions asking to convert a given number from one number system to an equivalent number in another number system.