You have got 1 million parking slots. At a time a parking slot can be free or not. To get next slot easily which data structure to implement?
Answer / Mayank Yadav
In C#, for efficiently managing the status of 1 million parking slots (free or occupied), you can implement a BitArray since it allows storing boolean values in contiguous memory and provides fast access to individual bits. However, if you need to perform more complex operations like finding the next free slot, you might want to consider using other data structures such as linked lists or hash tables.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why we use get and set method in c#?
How do we achieve encapsulation in c#?
What is the use of tuple in c#?
1)what is difference between char and varchar in sql server 2005 2) what is composite key and candidate key 3) what is temporary table and derived table 4) how to calculate difference between two dates
What is the difference between a function and a method?
What?s class SortedList underneath?
If I return out of a try/finally in c#, does the code in the finally-clause run?
Can constructor be private c#?
What is public or shared assemblies ?
What is the difference between array and list in c#?
why C++ Partial Object Oriented Programming Language and C# and Java Fully Object Oriented Language
11 Answers 3i Infotech, Alexa, Assyst, Naresh i Technologies, TCS,
What is a service layer c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)