https://github.com/suniksha12/data_structure_mcq
Hackerank , MCQs solution with explanation today i went through 3 MCQS of data structure in hackerank problem.
https://github.com/suniksha12/data_structure_mcq
Last synced: 4 months ago
JSON representation
Hackerank , MCQs solution with explanation today i went through 3 MCQS of data structure in hackerank problem.
- Host: GitHub
- URL: https://github.com/suniksha12/data_structure_mcq
- Owner: Suniksha12
- Created: 2024-09-08T11:57:09.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T12:02:50.000Z (9 months ago)
- Last Synced: 2025-01-08T13:31:25.681Z (5 months ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data Structures MCQs - Solved Today
Today, I worked on solving Data Structures MCQs. Below are the key questions I solved, along with the correct answers and links for more detailed explanations.
---
### **Q1: If we have a tree of 'n' nodes, how many edges will it have?**
1. 1
2. (n * (n - 1)) / 2
3. (n * (n - 1))
4. **n - 1** ✔️For more detailed explanation, check out [this link](https://www.geeksforgeeks.org/g-fact-18/).
---
### **Q2: Which of the following data structures can handle updates and queries in log(n) time on an array?**
1. Linked list
2. Stack
3. **Segment Tree** ✔️
4. QueueFor more details, refer to [this link](https://www.geeksforgeeks.org/segment-tree/).
---
### **Q3: Of the following data structures, which has a Last In First Out (LIFO) ordering? In other words, the one that came in last will be the first to be popped.**
1. Queue
2. **Stack** ✔️
3. Vector
4. Array ListFor more details, refer to [this link](https://www.geeksforgeeks.org/stack-data-structure/).
---
This file provides an overview of the questions I solved and the correct answers.