Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 8:32
SledgeHammer012-Feb-12 8:32 
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 8:42
sitebuilderLuc Pattyn2-Feb-12 8:42 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 9:07
SledgeHammer012-Feb-12 9:07 
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 9:30
sitebuilderLuc Pattyn2-Feb-12 9:30 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 9:45
SledgeHammer012-Feb-12 9:45 
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 10:01
sitebuilderLuc Pattyn2-Feb-12 10:01 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 10:08
SledgeHammer012-Feb-12 10:08 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 10:22
SledgeHammer012-Feb-12 10:22 
Again, nothing to do with license plates, just how you handle vast amounts of data (think Google or something along that scale).

With your solution, you are using the first 6 chars as the "prefix" / key and then "compressing" the last char... (36 plates into one entry).

So wouldn't you need the FULLY populated dictionary if say, every 36th plate was taken Wink | ;) .

So your storage requirement is 20GB between 2B plates and 78B plates Smile | :) . 2B in 20GB vs. 78B in 9GB with the bit array.

Sorry, hope I'm not getting you angry or anything Smile | :) , just this is how the interview went, so its a real world thing. They kept poking holes in everything haha...

But unless I misunderstood your algorithm, it does seem like you need the full 20GB as soon as you hit 2B plates (assuming 1 in every range of course)... if you had them in tightly packed groups, then your requirements wouldn't be as great.

I even told the interviewer once I started getting annoyed at his hole poking "Well, at that point I would probably change the license plate # selector algorithm to hand out #'s from a more tightly packed range". Lol.
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 10:33
sitebuilderLuc Pattyn2-Feb-12 10:33 
GeneralRe: How would you store this data (interview question) Pin
harold aptroot2-Feb-12 10:35
harold aptroot2-Feb-12 10:35 
AnswerRe: How would you store this data (interview question) Pin
Luc Pattyn2-Feb-12 10:51
sitebuilderLuc Pattyn2-Feb-12 10:51 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 11:45
SledgeHammer012-Feb-12 11:45 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 8:35
SledgeHammer012-Feb-12 8:35 
GeneralRe: How would you store this data (interview question) Pin
CCodeNewbie3-Feb-12 5:58
CCodeNewbie3-Feb-12 5:58 
QuestionRe: How would you store this data (interview question) Pin
Luc Pattyn3-Feb-12 6:01
sitebuilderLuc Pattyn3-Feb-12 6:01 
AnswerRe: How would you store this data (interview question) Pin
CCodeNewbie3-Feb-12 6:05
CCodeNewbie3-Feb-12 6:05 
GeneralRe: How would you store this data (interview question) Pin
Luc Pattyn3-Feb-12 6:06
sitebuilderLuc Pattyn3-Feb-12 6:06 
GeneralRe: How would you store this data (interview question) Pin
CCodeNewbie3-Feb-12 9:37
CCodeNewbie3-Feb-12 9:37 
AnswerRe: How would you store this data (interview question) PinPopular
Eddy Vluggen2-Feb-12 8:43
professionalEddy Vluggen2-Feb-12 8:43 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 9:01
SledgeHammer012-Feb-12 9:01 
GeneralRe: How would you store this data (interview question) Pin
jschell2-Feb-12 9:10
jschell2-Feb-12 9:10 
NewsRe: How would you store this data (interview question) Pin
Eddy Vluggen2-Feb-12 10:08
professionalEddy Vluggen2-Feb-12 10:08 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 10:31
SledgeHammer012-Feb-12 10:31 
GeneralRe: How would you store this data (interview question) Pin
Mycroft Holmes2-Feb-12 13:53
professionalMycroft Holmes2-Feb-12 13:53 
GeneralRe: How would you store this data (interview question) Pin
Eddy Vluggen2-Feb-12 10:04
professionalEddy Vluggen2-Feb-12 10:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.