Data Structures & Algorithms (DSA) Interview Questions
⇩
Disclaimer:
• The questions covered here are mostly conceptual
• I never claim only these type of questions are/should be asked during interviews
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Series: 1️⃣
Level: Beginner
Topics:
1️⃣ Algorithms
2️⃣ Data Structures
3️⃣ Array
4️⃣ Array-Algorithms
1️⃣ Algorithms
✪ What is an algorithm?
✪ What is time and space complexity of an algorithm?
✪ What is recursion? Where is it needed?
✪ What is iteration?
✪ Difference between Recursion and Iteration.
✪ Give some examples of recursive algorithms.
✪ What is divide and conquer? Give some examples.
✪ What is a greedy algorithm? Why is it used?
✪ Mention some greedy algorithms.
✪ What is Dynamic Programming?
✪ Where can dynamic programming be used?
✪ Mention some dynamic programming algorithms.
2️⃣ Data Structures
✪ Define a Data Structure.
✪ Give some examples of Data Structures.
✪ Relate one of the real life scenario with a Data Structure and explain it.
✪ What are different types of data structures?
✪ What does that "linear" mean in a linear data structure?
✪ Give some examples of linear data structures.
✪ Give some examples of non-linear data structures.
✪ What are some common operations performed on any data structure?
✪ What is traverse operation? What is its use?
3️⃣ Array
✪ Define an array.
✪ What is dimension of an array?
✪ How is an array stored in memory?
✪ How is a multi-dimensional array stored in memory?
✪ While creating an array, is its size always static?
✪ How to make size of an array dynamic?
✪ Implementation of which operations will change while making size of an array dynamic?
✪ What is index in an array?
✪ What is the base index? Take an example of a language and tell what is the base index.
✪ How to find memory location of an element at a particular index?
✪ Write pseudo code for inserting an element.
✪ Find Time and Space complexity of insertion operation.
✪ Write pseudo code for deleting an element.
✪ Find Time and Space complexity of deletion operation.
4️⃣ Array-Algorithms
Write Pseudo Code for 👇 and find Time and Space complexity.
✪ Reverse an array.
✪ Rotate an array clock/anticlockwise for k times.
✪ Shuffle an array.
✪ Merge 2 or, more arrays.
✪ Merge 2 sorted arrays to form a sorted array.
✪ Return a new array by picking each kth element
✪ Divide an array into k sub arrays where each one contains elements at k-distance
✪ Return a new array by dropping each kth element
✪ Create a mirror reflection of an array (reverse+merge)
✪ Check if an array is a palindrome?
The next 🧵 of this series will provide questions from
1️⃣ Linked List
2️⃣ Stack
3️⃣ Queue
4️⃣ Associative Array (Hash Table)
5️⃣ Algorithms based on these Data Structures
To help others getting access to these questions,
❤️ Like this Thread
🔁 RETWEET the first tweet
To never miss any content from me,
✅ Follow @swapnakpanda
🔔 Turn on Notifications
To give feedbacks and suggestions,
💬 Reply
• • •
Missing some Tweet in this thread? You can try to
force a refresh
✪ I am Swapna from India 🇮🇳
✪ I had 10+ years of Experience
✪ I was a Software Architect
✪ I quit job in 2016 for health issues
✪ I am now a Tech Educator
✪ I will soon have my Blog, Portfolio and YT Channel
• The questions covered here are mostly conceptual
• I never claim only these type of questions are/should be asked during interviews
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
• The questions covered here are mostly conceptual
• I never claim during interviews, only these type of questions are/should be asked
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Series: 1️⃣
Level: Beginner
Topics:
1️⃣ Basics
2️⃣ Tags and Elements
3️⃣ HTML Structure
4️⃣ Headings, New Line, Blank Space
5️⃣ Tables
• The questions covered here are mostly conceptual
• I never claim during interviews, only these type of questions are/should be asked
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
0️⃣ Basics (What, Why, How)
1️⃣ Traversal
2️⃣ IsEmpty
3️⃣ Size
4️⃣ Fetch an Element
5️⃣ Insert an Element
6️⃣ Delete an Element
7️⃣ Time & Space Complexities
✪ What is a variable?
✪ How to name a variable/Choose a valid variable name?
✪ Is "$" allowed in variable names?
✪ Can variable names begin with a numeric digit? If no, why?