Adobe
300+ Cognizant Interview Questions and Answers
Q101. What is merge sort and Quick sort. Adv and Disadv of each and which one would u use to sort huge list and Y
Merge sort and Quick sort are sorting algorithms used to sort arrays of data.
Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts each half recursively, and then merges the sorted halves.
Quick sort is also a divide and conquer algorithm that selects a pivot element and partitions the array around the pivot, sorting the two resulting sub-arrays recursively.
Merge sort has a time complexity of O(n log n) and is stable, but requires add...read more
Q102. Puzzle: There is a grid of soldier standing. Soldier ‘A’ is chosen: The tallest men from every column and the shortest among them. Soldier ‘B’ is chosen: The shortest men from every row and the tallest among th...
read moreComparison of heights of two soldiers chosen based on different criteria from a grid of soldiers.
Soldier A is chosen based on tallest men from every column and shortest among them.
Soldier B is chosen based on shortest men from every row and tallest among them.
The height of Soldier A and Soldier B cannot be determined without additional information about the grid of soldiers.
Q103. There is a paragraph having million characters. You have to find out the first non –repeating character in the complete paragraph. For example:- aab cld jb then answer should be :- c
i: Fragmentation- Internal and External
ii: Concepts of Kernel
iii: File Management
iv: Virtual functions and Friend Functions
v: Function Overloading And Overriding
vi: What is paging and Deman...read more
Q105. Given a polygon (could be regular, irregular, convex, concave), find out whether a particular point lies inside it or outside it
To determine if a point is inside a polygon, use the ray casting algorithm.
Create a line from the point to a point outside the polygon
Count the number of times the line intersects with the polygon edges
If the count is odd, the point is inside the polygon; otherwise, it is outside
Q106. Write a function which returns 1 when 2 is passed and return 2 when 1 is passed.1 number is missing from an array(1 to n). find thatHe just wanted sum of n terms minus sum of array solution.Now correlate the ab...
read moreQ107. How to find a loop in a Linked List and how to remove it
To find and remove a loop in a Linked List, we can use Floyd's Cycle Detection Algorithm.
Use two pointers, slow and fast, to detect if there is a loop in the Linked List
If the two pointers meet at some point, there is a loop
To remove the loop, set one of the pointers to the head of the Linked List and move both pointers one step at a time until they meet again
The meeting point is the start of the loop, set the next pointer of this node to NULL to remove the loop
Q108. Given an expression, remove unnecessary parenthesis. For example if (((a + b)) * c) is given make it (a + b) * c, as it evaluates in the same way without those parenthesis also
To remove unnecessary parenthesis from an expression, we need to apply a set of rules to identify and eliminate them.
Identify and remove parenthesis around single variables or constants
Identify and remove parenthesis around expressions with only one operator
Identify and remove parenthesis around expressions with operators of equal precedence
Identify and remove parenthesis around expressions with operators of different precedence
Apply the rules recursively until no more unnece...read more
Q109. 100 white eggs and 100 black eggs are distributed in 2 bags and now choosen a egg. The way to be distribute the eggs so that the probability of getting a black egg is maximum?
Distribute 50 white and 100 black eggs in one bag and 50 white and 0 black eggs in the other bag.
Distribute the black eggs in one bag and white eggs in the other bag
Ensure that both bags have equal number of white eggs
The bag with black eggs will have a higher probability of getting a black egg
Q110. Design a clock in which if you want to know about time in any region of this world, you can know .Hardware given is such that it has already built calculation device inside it. Long Discussion on various approa...
read moreDesign a clock to know time in any region of the world with built-in calculation device.
Create a clock with a world map and time zones marked on it.
Use the built-in calculation device to calculate the time difference between the user's location and the desired location.
Display the time in the desired location on the clock face.
Allow the user to input the desired location using a keypad or touchscreen.
Include a database of time zones and their offsets for accurate calculations...read more
Q111. What is the difference between mutex and a semaphore. Write down a crude implementation of both. How would you solve the mutual exclusion problem using semaphore. Propose a solution to the readers-writer proble...
read moreWhat is complexity of finding Height of tree in case of symmetric tree, Left skewed tree and Right skewed tree.
Q113. U have n vending machine out of which 1 is defected find the defected machine in O(1) on solving this he modified it give general solution for the case in which 2 machine are defected O(1) solution were require...
read moreQ114. famous Puzzles a) Measuring 4 liter water from 3 and 5 liter. b) 3 bulbs 3 switches, here is the link -----.php/puzzles/3-switches-3-bulbs/After this Next 2 rounds are video conferencing(V.C.) rounds as Hiring ...
read moreFamous puzzles including measuring 4 liters from 3 and 5 liters and 3 bulbs and 3 switches.
Measuring 4 liters puzzle involves filling 5 liter jug and transferring to 3 liter jug to get 4 liters
3 bulbs and 3 switches puzzle involves turning on one switch, waiting a few minutes, turning it off, and turning on another switch
These puzzles test problem-solving skills and creativity
Q115. If a subarray exist whose sum = k | leetcode(560)
Given an array of integers, find if a subarray exists whose sum equals to k.
Use a hashmap to store the prefix sum and its frequency.
Iterate through the array and check if the difference between current prefix sum and k exists in the hashmap.
If it exists, then a subarray with sum k exists.
Time complexity: O(n), Space complexity: O(n).
There are two empty bowls in a room. You have 50 white balls and 50 black balls. After you place the balls in the bowls, a random ball will be picked from a random bowl. Distribute the balls (all of them)...read more
Design a system where i can store incoming stream of chars in sorted manner and to answer a query whether a char is present or not
Q118. You are given a string in which every character is followed by space u have to return n/2 string that is each character as a separate string ..extra space were not allowed
Q119. given sudoku as id array of size . in a given empty cell find the possible numbers that could be possible. Asked me to write code for it
Given a Sudoku board, find possible numbers for an empty cell.
Iterate through empty cells and check possible numbers using row, column, and box constraints.
Use a set to keep track of possible numbers for each empty cell.
Return the set of possible numbers for the given empty cell.
Q120. Can you give a detailed process of the lead generation process ?
The lead generation process involves identifying potential customers and nurturing them into qualified leads.
Research and identify target audience
Create compelling content and offers
Promote content through various channels
Capture leads through forms or landing pages
Nurture leads through email marketing or lead scoring
Qualify leads through lead qualification criteria
Pass qualified leads to sales team for conversion
Q121. How to find longest last occurring word in a sentence with multiple whitespace
Finding the longest last occurring word in a sentence with multiple whitespace.
Split the sentence into words using whitespace as delimiter
Reverse the list of words
Iterate through the list and find the first occurrence of each word
Calculate the length of each last occurring word
Return the longest last occurring word
Q122. What’s priority queue. How will u make stack and queue with priority queue
Priority queue is a data structure that stores elements with priority levels and retrieves them in order of priority.
Priority queue is implemented using a heap data structure.
Stack can be implemented using a priority queue by assigning higher priority to the most recently added element.
Queue can be implemented using a priority queue by assigning higher priority to the oldest element.
Q123. What are the different type of projects we support like FTFP, TnM etc
We support various project types including FTFP, TnM, and Fixed Bid.
FTFP (Fixed Time Fixed Price) - project with a fixed timeline and budget
TnM (Time and Material) - project with a flexible timeline and budget based on actual hours worked and materials used
Fixed Bid - project with a fixed budget but flexible timeline
Examples: FTFP - website development, TnM - software maintenance, Fixed Bid - infrastructure upgrade
Q124. Given an array of integers, find the maximum product which can be formed by three numbers
Find the maximum product of three integers in an array.
Sort the array in descending order.
Check the product of the first three numbers and the product of the first and last two numbers.
Return the maximum of the two products.
Q125. Given an array of integers, find the length of the longest consecutive sub array which forms an AP
Find length of longest consecutive sub array forming an AP from given array of integers.
Sort the array in ascending order
Iterate through the array and find the longest consecutive sub array forming an AP
Use a variable to keep track of the length of the current consecutive sub array forming an AP
Use another variable to keep track of the length of the longest consecutive sub array forming an AP seen so far
Q126. Consider a recursive function with no end condition and architecture of your own laptop. What will happen? After how much time will the program crash.(Calculations and perfect answer was required)
Q128. Given two exactly similar balls having only one difference that one is hollow and one is solid. Give a feasible aproach to find which one is hollow without destroying the balls
To find which ball is hollow, we can compare their weights.
Weigh both balls on a scale and compare their weights.
The hollow ball will weigh less than the solid ball.
If the difference in weight is not noticeable, try rolling both balls on a flat surface.
The hollow ball will roll differently due to its hollow center.
Q129. Implement the qsort() in c/sort() in c++ library or your own custom sort which will sort any type of data on user defined criteria. write the function prototype, definition and another requirements
Implementing qsort() or custom sort() function in C/C++ to sort any type of data based on user-defined criteria.
Use qsort() function in C or sort() function in C++ to sort the data.
For custom sorting, define a comparison function that takes two elements and returns a negative, zero, or positive value based on their order.
The comparison function should be passed as a parameter to qsort() or sort() function.
Ensure the comparison function handles different data types and user-de...read more
Tell what is Polymorphism and what is difference between operator overloading and polymorphism. How Runtime Polymorphism is Implemented. What is abstract Classes and virtual functions.
Q131. In an Array of size 95 contain numbers in range 1 to 100. each number is at max once in the array. find the 5 missing numbers in array between 1-100
Find 5 missing numbers in an array of size 95 containing numbers in range 1 to 100.
Create a boolean array of size 100 and mark the present numbers
Iterate through the boolean array and find the missing numbers
Alternatively, use a HashSet to store the present numbers and find the missing ones
Q132. Which are the four storage classes in C
The four storage classes in C are auto, register, static, and extern.
Auto: default storage class for all local variables
Register: used to define local variables that should be stored in a register instead of RAM
Static: used to define local variables that retain their value between function calls
Extern: used to declare a global variable that is defined in another file
Q133. There are chocolates each worth x. You have total amount y with you. And you can exchange z wrappers for 1 chocolate. So in this way how many chocolates he can eat
Q134. Memory allocation for static varibles(when,which segment etc)
Static variables are allocated memory in the data segment of the program's memory space.
Static variables have a fixed memory location throughout the program's execution.
They are initialized to zero by default.
If initialized explicitly, they are stored in the data segment.
Static variables can be accessed by any function in the program.
Q135. Puzzle question -> 12 people on island with a seesaw. 11 of them have identical weight, one has higher or lower. How can you find out which one? You can only use the seesaw 3 times
Use the seesaw 3 times to find the person with different weight among 12 people on an island.
Divide the 12 people into 3 groups of 4.
Compare 2 groups on the seesaw, then narrow down the group with the different person.
Take the 4 people from the identified group and compare 2 of them on the seesaw to find the person with different weight.
Q136. Puzzle: you have 100 coins on table, 60 heads and 40 tails. With your eyes closed, how can you separate the coins into 2 groups such that each group has same number of tails
Separate 100 coins with 60 heads and 40 tails into 2 groups with equal number of tails.
Separate 40 coins and put them in one group
Put the remaining 60 coins in the other group
Since both groups have 40 tails, the remaining coins must have 20 tails each
Q137. Write a C function to convert array {1,3,5,7,2,4,6,8} to {1,2,3,4,5,6,7,8}.Then make it generalize. Various Test cases of it.Many C/C++ concept were discussed on this round like friend function, Inheritance etc
C function to sort an array in ascending order
Use bubble sort algorithm to sort the array
Create a function that takes array and its size as input
Test cases: empty array, array with one element, array with duplicates
Generalize the function by making it work for any array of integers
What is Vtable and VPTR in C++?
What is the concept of sub-query in terms of SQL?
What is E-R model in the DBMS?
How can you get the alternate records from the table in the SQL?
Q140. Copy fixed no of bytes from source to destination and its test cases( ex: copy(source, destination,bytes) so now command copy(a,a+3,8) will not give correct results in some cases and copy(a,a-4,8) will not give...
read moreCopying fixed number of bytes from source to destination and its test cases.
Ensure source and destination are not overlapping
Check if the number of bytes to be copied is greater than the available space in the destination
Handle cases where source or destination is NULL
Test cases should cover all possible scenarios including edge cases
Q141. Give an array of integers arr1, find a new array where array[i] = multiplication of all entries arr1 except arr1[i] without using division operator
To find a new array where each element is the product of all elements in the original array except the element at that index without using division operator.
Iterate through the array and calculate the product of all elements to the left of the current index for each element.
Iterate through the array in reverse and calculate the product of all elements to the right of the current index for each element.
Multiply the results from the two steps above to get the final array.
Q142. Given a wholly sorted two dimensional array , find the index of given element or return -1 if not present
Search for an element in a sorted 2D array and return its index if found
Start from the top right corner and compare the target element with the current element
If the target is smaller, move left; if larger, move down
Repeat until the element is found or all elements are checked
Q143. given a set of points in a plane, how would you make the most optimized triangular mesh-each point is a vertex of a triangle
To make the most optimized triangular mesh, use a Delaunay triangulation algorithm.
Use a Delaunay triangulation algorithm to connect the points with triangles.
Delaunay triangulation ensures that no point is inside the circumcircle of any triangle.
This algorithm creates triangles with the minimum angle possible, resulting in an optimized mesh.
Popular algorithms for Delaunay triangulation include Bowyer-Watson and incremental algorithms.
Q144. Given an integer(consider 4 bytes) find which byte is zero
Given an integer, determine which byte is zero.
Convert the integer to a byte array using bitwise operations.
Iterate through the byte array and check for a zero value.
Return the index of the zero byte.
Consider endianness when converting to byte array.
Q145. What is the running time for insertion, deletion and searching an element in a sorted array and the same for an unsorted array?
The running time for insertion, deletion, and searching in a sorted array is O(log n), while in an unsorted array it is O(n).
In a sorted array, insertion, deletion, and searching can be done using binary search, which has a time complexity of O(log n).
In an unsorted array, insertion and deletion require shifting elements, resulting in a time complexity of O(n). Searching also requires checking each element, resulting in a time complexity of O(n).
Q146. How would you determine if a coin is biased or not. Does the degree of biasity effect the number of experiments you have to perform?
Q147. Break linkedlist into two lists(positive and negative)
To break a linked list into two lists, we can traverse the list and add nodes to respective lists based on their value.
Traverse the linked list and add nodes to positive or negative list based on their value
Create two empty lists for positive and negative nodes
Iterate through the linked list and add nodes to respective lists
Join the two lists at the end to get the final result
Q148. In array only 1 element is unique rest are 2 times. How to find that? He further extend if one unique and rest are multiple of 3
Q149. Solve and code the problem of a ball falling from staircase. Each jump can be of 1 step or 2. Find the number of combination of reaching step N
Code to find number of combinations of reaching step N by ball falling from staircase with 1 or 2 steps per jump.
Use dynamic programming to solve the problem
Create an array to store the number of ways to reach each step
Initialize the array with base cases for steps 0, 1, and 2
Use a loop to fill in the array for steps 3 to N
The number of ways to reach step i is the sum of the number of ways to reach step i-1 and i-2
Return the value at the Nth index of the array
Q150. Given an array, find the Next Greatest Element to the right for each element
Find the Next Greatest Element to the right for each element in an array of strings.
Iterate through the array from right to left
Use a stack to keep track of elements
Pop elements from stack until a greater element is found
If no greater element is found, assign -1
Return the result array
Tell about Constructors and types of Constructors in C++. Why Virtual Destructors are possible while virtual Constructors are not Possible?
Q152. Program to check whether your machine is little endian or big endian
To check endianness, create a 4-byte integer with a known value and check the byte order.
Create a 4-byte integer with a known value
Check the value of the first byte to determine endianness
If the first byte is the least significant, the machine is little endian
If the first byte is the most significant, the machine is big endian
Q153. Find space and time complexity for a recursive function(he wrote it)
Finding space and time complexity of a recursive function.
Space complexity is the amount of memory used by the function.
Time complexity is the amount of time taken by the function to execute.
Recursive functions have higher space complexity due to the call stack.
Time complexity can be calculated using Big O notation.
Examples of recursive functions include factorial and Fibonacci sequence.
Q154. Suppose there are packages having volume m and there are n packets having volume a,b,c…. each having volume less than m. So you need to find out the minimum no. of packets required to wrap up the products
Q155. Many typical C/C++ declaration, memory allocation difference between new/malloc, free/delete and details about how memory allocation takes place
Tell the difference Between array and linked List. And according to which conditions Linked List and Array should be used.
1. Dynamic memory allocation for 2d array
2. How polymorphism works in C++(Vptr and Vtable implementation)
Q158. Gievn a binary tree and return all root to leaf node pathss row,col and value
Return all root to leaf node paths in a binary tree with row, col and value.
Traverse the binary tree recursively and keep track of the current path.
When a leaf node is reached, add the path to the result array.
Include row, col and value of each node in the path.
Use an array of strings to store the paths.
What is Memory Protection in OS ?
Q160. Two companies A & B have similar numbers. A trades at 10PE, B at 15PE, which one will you buy?
I would buy Company A as it has a lower PE ratio, indicating potentially better value for the investment.
Company A has a lower PE ratio of 10, suggesting it may be undervalued compared to Company B with a PE ratio of 15.
Investors typically prefer stocks with lower PE ratios as they offer better value for the price paid.
However, other factors such as growth prospects, industry trends, and financial health should also be considered before making a decision.
What is a Semaphore and operations on a semaphore?
What is context switching?
Q162. What are API 's can you give an incidence making maximum use it ?
APIs are tools that allow different software applications to communicate with each other. An example of maximum use is integrating a payment gateway API into an e-commerce website.
API stands for Application Programming Interface
APIs allow different software applications to communicate with each other
APIs can be used to integrate different functionalities into a software application
An example of maximum use is integrating a payment gateway API into an e-commerce website
Matrices, determinants and polynomial equations MCQs are their
All of them are of engineering mathematics level
Describe all the basic principles of OOPS . What is difference between Abstraction and Encapsulation.
Q165. How do you track margins for the projects
We track margins by closely monitoring project expenses and revenue.
We maintain a detailed project budget that includes all expenses and revenue.
We regularly review and update the budget to ensure accuracy.
We track actual expenses and revenue against the budget to identify any variances.
We use this information to make adjustments and ensure we are meeting our margin targets.
We also analyze historical data to identify trends and make informed decisions for future projects.
Q166. How does free know how many memory blocks to delete in the case of arrays
Free uses metadata stored in the heap to determine the number of memory blocks to delete for arrays.
Free stores metadata about the size of the allocated memory block in the heap.
Free uses this metadata to determine the number of memory blocks to delete for arrays.
For example, if an array of 10 integers was allocated, the metadata would indicate the size of the block as 40 bytes.
Free would then use this information to delete all 40 bytes of memory allocated for the array.
Q167. Complete code.There are balls of red, blue and green color. How will you sort them.Implement a generic swap function
Define Process and Threads in OS.
Q169. How do you handle change request with client
I handle change requests with clients by following a structured process and ensuring clear communication throughout.
Acknowledge the request and gather all necessary information
Assess the impact on project timeline, budget, and resources
Communicate the potential impact to the client and propose solutions
Obtain client approval before implementing any changes
Document all changes and update project plan accordingly
Q170. Merge two double linked list. What will be the difference if they are singly linked list
To merge two double linked lists, traverse to the end of the first list and connect it to the head of the second list.
Traverse to the end of the first list
Connect the last node of the first list to the head of the second list
If the lists are singly linked, we need to traverse to the end of the first list and connect it to the head of the second list. But we also need to keep track of the last node of the first list to connect it to the head of the second list.
Example: list1: ...read more
Q171. Print something before execution of main()(use static objects)
Static objects can be used to print something before main() execution.
Static objects are initialized before main() execution
They can be used to print something before main()
Example: static int x = printf("Hello World!");
Output: Hello World! will be printed before main() execution
Q172. Given an array of 1 to 30 numbers put minus before some numbers so that sum of elements in array is zero
Add minus sign to some numbers in array to make sum zero
Identify the sum of all numbers in the array
If sum is already zero, return the array as is
If sum is positive, add minus sign to one or more positive numbers until sum becomes zero
If sum is negative, add minus sign to one or more negative numbers until sum becomes zero
Q173. Explain multithreading and how global, static etc variables are stored and accessed by threads
Multithreading allows multiple threads to run concurrently. Global and static variables are stored in a shared memory space and accessed by all threads.
Multithreading enables concurrent execution of multiple threads.
Global and static variables are stored in a shared memory space accessible by all threads.
Threads can read and modify the values of global and static variables.
Synchronization mechanisms like locks or semaphores are used to prevent data races and ensure thread saf...read more
Q174. How will you integrate power BI to Adobe captivate prime? Project work on Power BI ?
Integrating Power BI with Adobe Captivate Prime can provide valuable insights for sales management.
Power BI can be used to create interactive dashboards and reports that can be integrated with Adobe Captivate Prime.
This integration can help sales managers to track the progress of their sales team and identify areas for improvement.
Project work on Power BI can involve creating custom reports and dashboards that are tailored to the specific needs of the sales team.
For example, ...read more
Q175. how do you negotiate timeline with your product owner or scrum team . waterfall model.how can you fit best to the role?
Negotiating timelines with product owners or scrum teams in a waterfall model requires clear communication, prioritization, and flexibility.
Communicate openly and regularly with the product owner and scrum team to understand project requirements and constraints.
Prioritize tasks based on importance and impact on project timeline.
Be flexible and willing to adjust timelines based on feedback and changes in project scope.
Use tools like Gantt charts or project management software ...read more
Q176. If F() generates 0 or 1 with probability .5 each, generate 0-7 with equal probability
To generate 0-7 with equal probability, use F() twice to generate a binary number and convert it to decimal.
Call F() twice to generate two binary digits
Combine the two binary digits to form a binary number
Convert the binary number to decimal to get a number between 0-3
Multiply the decimal number by 2 to get a number between 0-6
Add 1 to the result to get a number between 1-7
Q177. Two strings were given. You have to find whether they are permutations of each other. I gave the hashing technique. He then asked me to optimize it
Q178. WHAT IS OOPS WHY OOPS WHY NOT OOPS
OOPS stands for Object-Oriented Programming. It is a programming paradigm that uses objects and classes for code organization and reusability.
OOPS allows for better code organization and reusability through the use of classes and objects.
Encapsulation, inheritance, and polymorphism are key principles of OOPS.
Examples of OOPS languages include Java, C++, and Python.
Q179. WHAT IS DBMS WHY DBMS WHY NOT DBMS
DBMS stands for Database Management System. It is used to manage and organize data efficiently. It provides data security, integrity, and easy access.
DBMS helps in organizing and managing data efficiently.
It ensures data security and integrity by providing access control and data encryption.
DBMS allows for easy retrieval and manipulation of data through query languages like SQL.
Examples of DBMS include MySQL, Oracle, and Microsoft SQL Server.
What is heap sort and what is complexity of heap sort?
Q181. WHAT IS DSA WHAT IS WEB DEVELOPMENT
DSA stands for Data Structures and Algorithms. Web development is the process of creating websites and web applications.
DSA involves organizing and storing data efficiently for quick access and manipulation
Web development includes front-end (client-side) and back-end (server-side) development
Examples of DSA include arrays, linked lists, and sorting algorithms
Examples of web development technologies include HTML, CSS, JavaScript, and frameworks like React and Node.js
Q182. given 4 unsigned integers find their integer average (eg. (2,2,2,3) => (2+2+2+3)/4 = 2) consider integer division ) without typecasting
Find integer average of 4 unsigned integers without typecasting
Add all the integers and divide by 4
Use bit shifting to divide by 4
Handle overflow by using long long data type
Use unsigned int data type for input
Q183. Why so many sorting algorithms present where only one can serve the purpose
Q184. What happens when an recursive function is called
A recursive function calls itself until a base case is reached, then returns the result to the previous call.
Each call creates a new instance of the function on the call stack
The function continues to call itself until a base case is reached
Once the base case is reached, the function returns the result to the previous call
The previous call then continues executing from where it left off
A situation is given, we have to write a technical article of around 300-500 words (I dont remember exact word limit)
Q186. Real life example where hashmap can be used. Real life example where array can be used
Q187. There are N nuts and N bolts, u have to find all the pairs of nuts and bolts in minimum no. of iteration (comparision). All the nuts/bolts might have different diameter
Q188. Write a various test cases for checking the functionality of Adobe reader while saving it .Long discussion on it
Test cases for Adobe Reader's save functionality
Verify that the file is saved with the correct name and extension
Check that the saved file can be opened and read without errors
Test saving files with different sizes and formats
Verify that the save dialog box appears when saving a file
Check that the save operation can be cancelled without any issues
Test saving files to different locations and verify that they are saved correctly
Verify that the save operation does not overwrite ...read more
Q189. Two string are given check whether second string are substring of 1st string or not second string may contain wild card character like ‘*’ and ‘?’
Q190. Given a binary tree print the left most element in each level. Note: Nodes need not have children. It's not complete binary tree
Print the leftmost element in each level of a binary tree.
Use a queue to traverse the tree level by level.
At each level, print the first node in the queue.
Add the left and right child of the node to the queue if they exist.
Repeat until the queue is empty.
What Friend Functions in C++?
Overload pre and post-increment operator
Q193. What would you suggest to take design to an advance level?
To take design to an advanced level, one should focus on continuous learning, exploring new technologies, collaborating with others, and seeking feedback.
Continuously learn and stay updated with the latest design trends and technologies.
Explore new tools and software that can enhance the design process and improve efficiency.
Collaborate with other designers, engineers, and stakeholders to gain different perspectives and insights.
Seek feedback from users, clients, and colleagu...read more
Q194. What happens when a C program is compiled and executed in details
Q195. Difference between process and thread. Give me a real life example where thread can be used
It was just discussed at the end.
Q197. Which type of project should you try ftfp or tnm
FTFP is suitable for projects with well-defined requirements and stable scope, while TNM is suitable for projects with evolving requirements and uncertain scope.
FTFP (Fixed Time Fixed Price) is suitable for projects with well-defined requirements and stable scope.
TNM (Time and Material) is suitable for projects with evolving requirements and uncertain scope.
FTFP is best suited for projects where the scope is clear and the requirements are well-defined.
TNM is best suited for p...read more
Q198. U have given a link list make a new link list which is reverse of original link list
Q199. Where are local variables, dynamic allocated variables, global variables stored?
Q200. Test Cases of Mobile for rural area for hardware as well as software point of view. Long discussion on this
Test cases for mobile hardware and software in rural areas
Test hardware durability in extreme weather conditions
Test software compatibility with low network connectivity
Test battery life in areas with limited access to electricity
Test user interface for ease of use for non-tech savvy users
Test audio and visual features for clarity in noisy environments
More about working at Adobe
Top HR Questions asked in Cognizant
Interview Process at Cognizant
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month