Question Bank
Filter real, curated interview questions by topic, difficulty, and type. Open any question to practice and rate your confidence.
Filter by company and topic2 active
RecentMost viewed
5 questionsFree4Locked1
- Automata (complete the function): Complete the function to return the second largest element in an integer array of size n (assume distinct values, n >= 2).IntermediateDsa· codingFreeReported frequent at Cognizant
- Automata (debug): The following function should return the factorial of n, but it returns wrong values. Find and fix the bug. int fact(int n){ int f = 0; for(int i=1;i<=n;i++) f = f * i; return f; }BeginnerDsa· debuggingFreeReported frequent at Cognizant
- What is the difference between an array and a linked list in data structures, and when would you use each?BeginnerDsa· comparisonFreeReported frequent at Cognizant
- Which of the following is a correct property of a stack data structure?BeginnerDsa· multiple choiceFree
- Given an array of integers, find the length of the longest subarray whose sum is zero, then optimise your solution.IntermediateDsa· coding₹99 (Interview Prep or Pro plan required)