Cognizant Interview Question

Implement a function to reverse a string. Given an array of integers, find the two numbers that add up to a specific target sum. Implement a function to check if a given string is a palindrome. Write code to find the factorial of a number. Explain what a binary search is and how it works. Data Structures: Explain the difference between an array and a linked list. Implement a stack or a queue using arrays or linked lists. Describe the characteristics of a binary tree and its types. How does a hash table work, and why is it useful? Object-Oriented Programming (OOP): Explain the principles of object-oriented programming (inheritance, encapsulation, abstraction, and polymorphism). Describe what a class and an object are in OOP. Implement a simple class in a programming language of your choice. Database and SQL: Write an SQL query to retrieve all records from a table named "Customers." Explain the differences between SQL and NoSQL databases. What is normalization, and why is it important