First job / Project / Internship application
Ability to program is much more important than resumes and performance in college. That is why, I use this programming assignment as a filter for those looking for a job (1st or 2nd job) or an internship (6-month internships only, MCS/MCM/MCA), or a BE project. If you would like me to forward your resume to companies that I know, complete this assignment and send it to me.
Write a program as described below in a programming language of your choice, and send your program to email@example.com.
You are given a file consisting of a number of lines. Each line is in the following format:
- The four fields in each line are separated by the pipeline character '|'
- "id" is an integer, which is supposed to be unique.
- "timestamp" is an integer - number of seconds since some time in the past
- "name" is a single word of text
- "remaining text" is a maximum of 140 characters of text. You can assume that "remaining text" does not contain the character '|'
The problem is that the input file contains some duplicate entries. (Duplicate entries are those that have the same value in the 'id' field). And the ordering of the lines is not good.
Your program must read the input file, get rid of the duplicates, and then output the lines in the same format, but ordered by the timestamp (descreasing). Your program should produce a file called 'output.txt' which contains unique lines, ordered by timestamp. See this file for what the output should look like
Send the source code of your program and the output of your program to the company that you are interested in (details at the bottom of this page).
- You may use any programming language that you like. The more esoteric, the better.
- Feel free to make any reasonable assumptions. Be prepared to defend your assumptions when we meet in person
- Be prepared to discuss and defend the choices you made in the algorithm. If I ask why you chose data structure X instead of data structure Y, you should be able to answer intelligently
- The assignment might have bugs. If you think there is an error in the problem statement or the input file, please let me know.
- See the sample input file. This is the kind of input your program will be expected to process.
- See the sample output file. This is the expected output of your program.
- Bonus points to anybody who can guess what this data is, and what/why this problem might occur
Where to send your entry
Send your program to firstname.lastname@example.org