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
3 questions
- 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