DSA INTERVIEW QUESTIONS AND ANSWERS
1. What is the difference between file structure and storage structure?
The difference lies in the memory area accessed. Storage structure refers to the data structure in the memory of the computer system,
whereas file structure represents the storage structure in the auxiliary memory.
2. Are linked lists considered linear or non-linear Data Structures?
Linked lists are considered both linear and non-linear data structures depending upon the application they are used for. When used for
access strategies, it is considered as a linear data-structure. When used for data storage, it is considered a non-linear data structure.
3. How do you reference all of the elements in a one-dimension array?
All of the elements in a one-dimension array can be referenced using an indexed loop as the array subscript so that the counter runs
from 0 to the array size minus one.
4. What are dynamic Data Structures? Name a few.
They are collections of data in memory that expand and contract to grow or shrink in size as a program runs. This enables the programmer
to control exactly how much memory is to be utilized.Examples are the dynamic array, linked list, stack, queue, and heap.
5. What is a Dequeue?
It is a double-ended queue, or a data structure, where the elements can be inserted or deleted at both ends (FRONT and REAR).
6. What operations can be performed on queues?
enqueue() adds an element to the end of the queue
dequeue() removes an element from the front of the queue
init() is used for initializing the queue
isEmpty tests for whether or not the queue is empty
The front is used to get the value of the first data item but does not remove it
The rear is used to get the last item from a queue.
7. What is the merge sort? How does it work?
Merge sort is a divide-and-conquer algorithm for sorting the data. It works by merging and sorting adjacent data to create bigger sorted
lists, which are then merged recursively to form even bigger sorted lists until you have one single sorted list.
8.How does the Selection sort work?
Selection sort works by repeatedly picking the smallest number in ascending order from the list and placing it at the beginning. This process is repeated moving toward the end of the list or sorted subarray.
Scan all items and find the smallest. Switch over the position as the first item. Repeat the selection sort on the remaining N-1 items. We always iterate forward (i from 0 to N-1) and swap with the smallest element (always i).
Time complexity: best case O(n2); worst O(n2)
Space complexity: worst O(1)
9. What are the applications of graph Data Structure?
Transport grids where stations are represented as vertices and routes as the edges of the graph
Utility graphs of power or water, where vertices are connection points and edge the wires or pipes connecting them
Social network graphs to determine the flow of information and hotspots (edges and vertices)
Neural networks where vertices represent neurons and edge the synapses between them
10. What is an AVL tree?
An AVL (Adelson, Velskii, and Landi) tree is a height balancing binary search tree in which the difference of heights of the left
and right subtrees of any node is less than or equal to one. This controls the height of the binary search tree by not letting
it get skewed. This is used when working with a large data set, with continual pruning through insertion and deletion of data.
11. Differentiate NULL and VOID ?
Null is a value, whereas Void is a data type identifier
Null indicates an empty value for a variable, whereas void indicates pointers that have no initial size
Null means it never existed; Void means it existed but is not in effect
You can check these resources for Coding interview Preparation
Credits: https://t.me/free4unow_backup
All the best 👍👍
1. What is the difference between file structure and storage structure?
The difference lies in the memory area accessed. Storage structure refers to the data structure in the memory of the computer system,
whereas file structure represents the storage structure in the auxiliary memory.
2. Are linked lists considered linear or non-linear Data Structures?
Linked lists are considered both linear and non-linear data structures depending upon the application they are used for. When used for
access strategies, it is considered as a linear data-structure. When used for data storage, it is considered a non-linear data structure.
3. How do you reference all of the elements in a one-dimension array?
All of the elements in a one-dimension array can be referenced using an indexed loop as the array subscript so that the counter runs
from 0 to the array size minus one.
4. What are dynamic Data Structures? Name a few.
They are collections of data in memory that expand and contract to grow or shrink in size as a program runs. This enables the programmer
to control exactly how much memory is to be utilized.Examples are the dynamic array, linked list, stack, queue, and heap.
5. What is a Dequeue?
It is a double-ended queue, or a data structure, where the elements can be inserted or deleted at both ends (FRONT and REAR).
6. What operations can be performed on queues?
enqueue() adds an element to the end of the queue
dequeue() removes an element from the front of the queue
init() is used for initializing the queue
isEmpty tests for whether or not the queue is empty
The front is used to get the value of the first data item but does not remove it
The rear is used to get the last item from a queue.
7. What is the merge sort? How does it work?
Merge sort is a divide-and-conquer algorithm for sorting the data. It works by merging and sorting adjacent data to create bigger sorted
lists, which are then merged recursively to form even bigger sorted lists until you have one single sorted list.
8.How does the Selection sort work?
Selection sort works by repeatedly picking the smallest number in ascending order from the list and placing it at the beginning. This process is repeated moving toward the end of the list or sorted subarray.
Scan all items and find the smallest. Switch over the position as the first item. Repeat the selection sort on the remaining N-1 items. We always iterate forward (i from 0 to N-1) and swap with the smallest element (always i).
Time complexity: best case O(n2); worst O(n2)
Space complexity: worst O(1)
9. What are the applications of graph Data Structure?
Transport grids where stations are represented as vertices and routes as the edges of the graph
Utility graphs of power or water, where vertices are connection points and edge the wires or pipes connecting them
Social network graphs to determine the flow of information and hotspots (edges and vertices)
Neural networks where vertices represent neurons and edge the synapses between them
10. What is an AVL tree?
An AVL (Adelson, Velskii, and Landi) tree is a height balancing binary search tree in which the difference of heights of the left
and right subtrees of any node is less than or equal to one. This controls the height of the binary search tree by not letting
it get skewed. This is used when working with a large data set, with continual pruning through insertion and deletion of data.
11. Differentiate NULL and VOID ?
Null is a value, whereas Void is a data type identifier
Null indicates an empty value for a variable, whereas void indicates pointers that have no initial size
Null means it never existed; Void means it existed but is not in effect
You can check these resources for Coding interview Preparation
Credits: https://t.me/free4unow_backup
All the best 👍👍
👍4❤1
Learn DSA Visually
Links to Sites to help you learn Data Structures and Algorithms Visually:
Data Structure Visualisations :
https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
Visualgo:
https://visualgo.net/en
Visualizing Algorithms by Mike Bostock :
https://bost.ocks.org/mike/algorithms/
All the best 👍👍
#coding
Links to Sites to help you learn Data Structures and Algorithms Visually:
Data Structure Visualisations :
https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
Visualgo:
https://visualgo.net/en
Visualizing Algorithms by Mike Bostock :
https://bost.ocks.org/mike/algorithms/
All the best 👍👍
#coding
👍4❤1
15+ Must Watch Movies for Programmers🧑💻🤖
1. The Matrix
2. The Social Network
3. Source Code
4. The Imitation Game
5. Silicon Valley
6. Mr. Robot
7. Jobs
8. The Founder
9. The Social Dilemma
10. The Great Hack
11. Halt and Catch Fire
12. Wargames
13. Hackers
14. Snowden
15. Who Am I
Happy Coding ♥️
1. The Matrix
2. The Social Network
3. Source Code
4. The Imitation Game
5. Silicon Valley
6. Mr. Robot
7. Jobs
8. The Founder
9. The Social Dilemma
10. The Great Hack
11. Halt and Catch Fire
12. Wargames
13. Hackers
14. Snowden
15. Who Am I
Happy Coding ♥️
❤15👍2
Free Resources to learn C & C++ Programming
👇👇
Fundamentals of Programming Languages Free Udacity course
https://imp.i115008.net/5bmnKL
C++ for Programmers Free Udacity Course
https://imp.i115008.net/kjoq9V
C++ Tutorial for Complete Beginners Free Udemy Course
https://bit.ly/3yDNoCV
C Programming documentation from Microsoft
https://docs.microsoft.com/en-us/cpp/c-language/?view=msvc-170&viewFallbackFrom=vs-2019
C Programming Free Book
https://books.goalkicker.com/CBook/CNotesForProfessionals.pdf
C++ Notes for Professional
https://books.goalkicker.com/CPlusPlusBook/CPlusPlusNotesForProfessionals.pdf
Join @free4unow_backup for more free courses
ENJOY LEARNING 👍👍
👇👇
Fundamentals of Programming Languages Free Udacity course
https://imp.i115008.net/5bmnKL
C++ for Programmers Free Udacity Course
https://imp.i115008.net/kjoq9V
C++ Tutorial for Complete Beginners Free Udemy Course
https://bit.ly/3yDNoCV
C Programming documentation from Microsoft
https://docs.microsoft.com/en-us/cpp/c-language/?view=msvc-170&viewFallbackFrom=vs-2019
C Programming Free Book
https://books.goalkicker.com/CBook/CNotesForProfessionals.pdf
C++ Notes for Professional
https://books.goalkicker.com/CPlusPlusBook/CPlusPlusNotesForProfessionals.pdf
Join @free4unow_backup for more free courses
ENJOY LEARNING 👍👍
👍1
Sample email template to reach out to HR’s as fresher
I hope you will found this helpful 🙂
Hi Jasneet,
I recently came across your LinkedIn post seeking a React.js developer intern, and I am writing to express my interest in the position at Airtel. As a recent graduate, I am eager to begin my career and am excited about the opportunity.
I am a quick learner and have developed a strong set of dynamic and user-friendly web applications using various technologies, including HTML, CSS, JavaScript, Bootstrap, React.js, Vue.js, PHP, and MySQL. I am also well-versed in creating reusable components, implementing responsive designs, and ensuring cross-browser compatibility.
I am confident that my eagerness to learn and strong work ethic will make me an asset to your team.
I have attached my resume for your review. Thank you for considering my application. I look forward to hearing from you soon.
Thanks!
I hope you will found this helpful 🙂
👍4
Coding is just like the language we use to talk to computers. It's not the skill itself, but rather how do I innovate? How do I build something interesting for my end users?
In a recently leaked recording, AWS CEO told employees that most developers could stop coding once AI takes over, predicting this is likely to happen within 24 months.
Instead of AI replacing developers or expecting a decline in this role, I believe he meant that responsibilities of software developers would be changed significantly by AI.
Being a developer in 2025 may be different from what it was in 2020, Garman, the CEO added.
Meanwhile, Amazon's AI assistant has saved the company $260M & 4,500 developer years of work by remarkably cutting down software upgrade times.
Amazon CEO also confirmed that developers shipped 79% of AI-generated code reviews without changes.
I guess with all the uncertainty, one thing is clear: Ability to quickly adjust and collaborate with AI will be important soft skills more than ever in the of AI.
In a recently leaked recording, AWS CEO told employees that most developers could stop coding once AI takes over, predicting this is likely to happen within 24 months.
Instead of AI replacing developers or expecting a decline in this role, I believe he meant that responsibilities of software developers would be changed significantly by AI.
Being a developer in 2025 may be different from what it was in 2020, Garman, the CEO added.
Meanwhile, Amazon's AI assistant has saved the company $260M & 4,500 developer years of work by remarkably cutting down software upgrade times.
Amazon CEO also confirmed that developers shipped 79% of AI-generated code reviews without changes.
I guess with all the uncertainty, one thing is clear: Ability to quickly adjust and collaborate with AI will be important soft skills more than ever in the of AI.
👍2❤1