Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
C# Program to test efficient coding
"AddUser" accepts a User instance as a parameter and add it to a collection.
"GetUser" accepts a UserID as a parameter and returns the corresponding User instance. It is important that this executes quickly as it will be used often.
"GetOrderedUserArray" returns an array of User instances ordered by UserID. It is important that this executes quickly as it will be used often.
public class User
{
public int UserID;
public string FamilyName;
public string GivenName;
public User(
int userID,
string familyName,
string givenName)
{
UserID = userID;
FamilyName = familyName;
GivenName = givenName;
}
}
Profile Answers by netacct Questions by netacct
Questions by netacct
Related Answered Questions
Related Open Questions