GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 411 of 436    Print  
Data Structures
Assume you have large set of data, say more than 100,000 elements. Each data element has a unique string associated with it.
1. What data structure has the optimal algorithmic access time to any element when the only thing you know about the element is the unique string associated with it?
2. What is the O() time for access to any element using this data structure?
3. What data structures would you use in the implementation of a single new data structure that has all of the following properties? Explain how this implementation works.
o Optimal algorithmic random access time to any element knowing only the unique string associated with it (as above)
o Keeps track of the order of insertion into the data structure, so you can acquire the elements back in the same order
o Optimal algorithmic random access time to any element knowing only the index of insertion.



  
Total Answers and Comments: 1 Last Update: December 28, 2008     Asked by: musclebai 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 28, 2008 01:04:28   #1  
Loki117 Member Since: February 2007   Contribution: 5    

RE: Data Structures
1) Hashtable

2) 0(n-1)

3) An arraylist which contains keys to a hashtable which contains the data this covers all requirements.

 
Is this answer useful? Yes | No

 Related Questions

Different parameter data types, different number of parameters, different order of parameters.  
Latest Answer : A method can be overloaded by having different parameters as in different type of parameters and well different number of parameters.Also, if the parameter types are different than you can also have different return type.example :you can have public int ...

No.  
Latest Answer : Ans:No ...

HashTable. What is class SortedList underneath?  
Latest Answer : A ns:HasTable ...

It points to the object that is pointed to by this reference. Object’s instance data is shown.  
Latest Answer : Ans:It points to the object that is pointed to by this reference. Object’s instance data is shown ...

Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).  
Latest Answer : Ans:Yes,It is corect.Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly). ...

Presentation (UI), business (logic and underlying code) and data (from storage or other sources).  
Latest Answer : Ans:1.Presentation (UI), 2.business (logic and underlying code) and 3.data access layer(from storage or other sources). ...

SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access 
Latest Answer : Ans:Advantage:SQLServer.NET data provider is high-speed and robust.DisAdvantage.but requires SQL Server license purchased from Microsoft ...

It returns a read-only dataset from the data source when the command is executed.  
Latest Answer : DataReader Class represents a read-only and forward-only stream of data.An instance of this class is used to hold the data returned by executing the Select statement in the DBCommand object using Executereader() method of the DBCommand Class. ...

Transaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions), Consistent (data is either committed or roll back, no “in-between” case where 
Latest Answer : Ans:ACID:ExpandingA:AtomicTransaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions)C:ConsistentConsistent (data is either committed or roll back, no “in-between” case where something has been updated ...

Microsoft.Access.  
Latest Answer : it is System.Data.OleDb .. ...


 Sponsored Links

 
Related Articles

Breaking up XML into Relational Data

Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data the example in this section illustrates how you can shred XML data back into relational data This reverse operation can be useful if your application works with relation
 

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Retrieving XML Data

Retrieving XML DataTo retrieve XML data from an XMLType table you can use a SELECT SQL statement just as you would if you had to query a relational table For example to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section you might issue the
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

ODP.NET - Techniques to Improve Performance while Retrieving Data

ODP NET Techniques to Improve Performance while Retrieving Data Performance tuning is a great subject in Oracle Volumes of books would not be enough to cover every aspect of performance tuning in Oracle However in this section we will only discuss the fundamental performance techniques while working
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving Typed Data

ODP NET Retrieving Typed Data While retrieving values from OracleDataReader we can extract information available in individual columns of a particular row either by using column ordinal position values or column names mosgoogle Retrieving Typed Data Using Ordinals ODP NET provides data specific enum
 

ODP.NET - Retrieving Data Using OracleDataReader

ODP NET Retrieving Data Using OracleDataReader OracleDataReader is simply a read only and forward only result set It works only if the database connection is open and it makes sure that the connection is open while you are retrieving data As the data that it retrieves is read only it is a bit faster
 

ODP.NET - Fundamental ODP.NET Classes to Retrieve Data

ODP NET Fundamental ODP NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP NET we need to work with a few of the ODP NET classes At this point we will discuss the most fundamental classes available in ODP NET for retrieving data mosgoogle The following is the list of fun
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape