algorithm - How to answer find duplicates in array extension questions? -


i @ technical interview, given question "find duplicates in array" , solved in o(n) time hashtable no problem, given barrage of follow questions.

orig: determine if array contains duplicate entries.    f1: if array large, , had distributed across multiple machines.    f2: if network connection between these machines prone failure?    f3: if hardware not 100% reliable , may give off wrong answers?    f4: design system multiple simultaneous users may need update array, while need maintain uniqueness of entries. 

i thought f1 , said wouldn't wise use huge hashtable , trade runtime o(n²) compensate o(1) memory, wasn't sure rest. help?

f2: have duplicate data on different machines, can chose data or part of data.

f3: use checksum values when transferring data between machines.

f4: use kind of synchronisation (like semaphores) make sure updating not done simultaneously.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -