💻 Coding Interview Questions
1️⃣ What is the difference between an array and a linked list?
Answer: Arrays use contiguous memory and allow fast indexing. Linked lists use pointers and allow easy insert/delete.
2️⃣ What is time complexity?
Answer: It measures how runtime grows with input size (e.g., O(1), O(n), O(log n)).
3️⃣ What is a stack?
Answer: A data structure that follows LIFO (Last In, First Out).
4️⃣ What is a queue?
Answer: A data structure that follows FIFO (First In, First Out).
5️⃣ What is recursion?
Answer: A function calling itself until a base condition is met.
6️⃣ What is a hash table?
Answer: A data structure that stores key-value pairs for fast lookup.
7️⃣ Difference between == and === (or equivalent)?
Answer: == compares values, === compares value + type.
8️⃣ What is a variable?
Answer: A named storage location for data.
9️⃣ What is an infinite loop?
Answer: A loop that never stops because the exit condition is missing or false.
🔟 What is debugging?
Answer: The process of finding and fixing errors in code.
Post #1223
784
- ❤ 4