DIFFICUL - DIFFICULT INTERVIEW

no tags 

 


DIFFICULT INTERVIEW

 

Interviewer: Tell me about yourself

Student: I’m so and so.. bla bla bla.. I do have 6.2 cgpa with 10 current arrears

Interviewer: Tell me about your achievements

Student: Actually I’ve achieved nothing so far except getting selected for this interview

Interviewer: What are your hobbies?

Student: Uh.. Films, songs, roaming, being in facebook..

Interviewer: What kind of software are you familiar with?

Student: Hmm.. I’m good at MS word and MS paint and a little excel

Interviewer: Do you know something in Programming and Data Structures?

Student: Yeah.. They taught me some sorting algorithms..

Interviewer: Just sort the given strings and get into our company.

Input Specification:

The first line consists of an integer n, the no. of strings followed by n lines with one string(1<=length<=12) in each line.

Output Specification:

Just print the sorted order of strings one per line.


Input constraints:

 1<=n<=500000

Sample Input:

4

apple

mango

banana

orange

 

Sample Output:

apple

banana

mango

orange


hide comments
cegprakash: 2014-01-22 08:55:26

Merge sort and Randomized quick sort won't TLE

cegprakash: 2012-04-05 14:52:24

@Garima: have u done I/O optimisations?

Garima Sachan: 2012-04-05 14:52:24

i implemented heap merge and quick still TLE :S


Added by:cegprakash
Date:2012-01-03
Time limit:2.545s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64