Jump to content

Coder Battle #2: Sorting

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
99 replies to this topic

#1
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Welcome to the official thread for Coder Battle #2. If you haven't done so already, please read the rules here: http://forum.codecal...ttle-rules.html

Battle #2: Rules
For this battle you will write a sorting algorithm. The complete program should accept a file path argument (or allowing selecting a path) and parse a CSV File. The CSV file will contain at most 20 lines and each line will have data in the following format:

integer(comma)String Wrapped in Double Quotes(comma)integer

An example:

20,"ABCDE",30


Your sorting algorithm will need to sort by the first integer, string ("ABC" should be listed before "ABCD") and the second integer.

If your program was given this file:

19,"DEF",21

19,"ABC",10

4,"XYZ",59

4,"XYZ",47

98,"String Value",1234


It should be sorted into:

4,"XYZ",47

4,"XYZ",59

19,"ABC",10

19,"DEF",21

98,"String Value",1234


Judging
The judges will analyze performance on several source files to probe for weaknesses in the algorithm. This battle will be judged by the forum staff using a voting system similar to Battle #1. This means that moderators and admins cannot participate in this battle. We will attempt to trip your algorithm up by using known sorting weaknesses. You should keep this in mind when building your algorithm and learn what weaknesses exist.

Submissions
Submissions must include source code and either directions for compiling or a compiled version. You will need to send the submissions to me via email. Please zip the source and the compiled versions in separate files. My email address is my username @codecall.net.

Duration
Submission must be handed in by November 15th. That is 14 days from now so you have plenty of time.

Compete
If you want to participate in this battle please reply to this thread with the language you will be building your algorithm in.

Reward
The winner will receive a +rep from two of the mods/admins (~40 +rep). Runner-up will receive +rep from one of the mods/admins (~20 +rep).


Do not use any built-in sorting functions! Your algorithm should be your own.

#2
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,674 posts
Count me in, ill be using C#

#3
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
I think I will pass on this one :D I will still help whoever needs it :)
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#4
Donovan

Donovan

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 798 posts
I will join in for the fun.

Language: Python

(.. lol I am not going to do very well in this because I am by no means a Python guru 0.0 lol...)
Posted Image
+Friend Me | My Graphics | Forum Rules | Help Forum | Forum FAQ

#5
Guest_Jordan_*

Guest_Jordan_*
  • Guests

Brandon W said:

I think I will pass on this one :D I will still help whoever needs it :)

How come? It would be great practice for you in PHP.

#6
melink14

melink14

    Newbie

  • Members
  • Pip
  • 6 posts
I'll probably do this. Probably in C++.

Does it have to compile on a specific platform?

#7
Guest_Jordan_*

Guest_Jordan_*
  • Guests
No, what platform are you planning on using?

#8
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I'm making one with a nice GUI in VB.NET. :)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#9
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts

Brandon W said:

I think I will pass on this one :D I will still help whoever needs it :)

C'mon - You can do it. It'll be a great challenge for your PHP skills. :) C'mon you can do it. :D

Anyways yeah I'll try to come up with something in Java. :D

#10
melink14

melink14

    Newbie

  • Members
  • Pip
  • 6 posts

Jordan said:

No, what platform are you planning on using?

I was probably going to do it with g++ on linux, since that's what I've been using lately. But it might be useful to dust off the old visual studio as well. So I was wondering if it mattered.

#11
Guest_Jordan_*

Guest_Jordan_*
  • Guests
No, we have Linux machines we can test it on so choose whichever you prefer.

#12
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Also, g++ works just fine on windows.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog