Skip to content

Instantly share code, notes, and snippets.

@mrange
Created March 26, 2017 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrange/ea0b2ab04238509dc4fdccf422c76c7a to your computer and use it in GitHub Desktop.
Save mrange/ea0b2ab04238509dc4fdccf422c76c7a to your computer and use it in GitHub Desktop.
A simple performance problem

Optimizing a simple problem

I was introduced to a simple optimization problem by one of my interns when working at Ericsson. He was about to participate in a friendly competition where they were asked to find a performant solution to the problem:

The problem

You have a file containing up to 6 million lines where each line has the following form: ABC123. Letters used are A-Z except I, Q and V. Digits used are 0-9.

You only need to answer yes or no to whether the file contains duplicates.

The performance measurement shall include the cost of reading file to memory.

You can find test data here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment