Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Coder's Corner Lounge (http://www.programmingforums.org/forum11.html)
-   -   Sorting Algorithms (http://www.programmingforums.org/showthread.php?t=8621)

6431hoho Feb 27th, 2006 6:10 PM

Sorting Algorithms
 
If it's not so much trouble, could someone convert these (or only one) sorting algorithms into turing (programming language) please, I beg you. I have been working my ass off (science fair in 3 days) to write it in turing but have failed miserably.

3.3 Shell sort
3.4 Merge sort
3.5 Heapsort
3.6 Quicksort
3.7 Radix sort

Thank you very much.

All the algorithms are here:

http://en.wikipedia.org/wiki/Sort_algorithm

DaWei Feb 27th, 2006 6:16 PM

This isn't a "Buy your schoolwork done here" forum. As a matter of fact, it's contrary to the rules. Certainly, doing another's work for them isn't in their best long-term interests. Generally speaking, one has been given enough time to accomplish one's assignments, unless one has been diddling and stink-fingering around.

andro Feb 27th, 2006 6:25 PM

This is what happens when it gets done ONE TIME for some other kid :(

nnxion Feb 27th, 2006 6:37 PM

Searching google for any of these will get your job done.

Jessehk Feb 27th, 2006 6:50 PM

I have to learn Turing, too. I know it's a bad language, but despite that, nobody will do your work for you. Research on google for pseudo-code.

hoffmandirt Feb 27th, 2006 7:40 PM

What do you mean by bad language?

Jessehk Feb 27th, 2006 8:05 PM

Quote:

Originally Posted by hoffmandirt
What do you mean by bad language?

I should have clarified. I don't really like it. It is too hard to do useful things (though I haven't really seen the language in its entirety).

hoffmandirt Feb 27th, 2006 8:16 PM

I just googled it. I wasn't aware that there was a Turing language. Is it named in relation to Alan Turing or that a coincidence.

Jessehk Feb 27th, 2006 8:21 PM

Wow, we're going waaaaay off topic.

http://en.wikipedia.org/wiki/Turing_...mming_language

It is based heavily off-of pascal.

for example, here is a program that will fill an array with squares:

:


var numbs : array 1 .. 5 of int

function square(n : int) : int
        result n * n
end square

for x : 1 .. 5
        numbs(x) := square(x)
        put x, "x", x, "=", numbs(x) : 5
end for


Maybe it's just my personal disdain...

hoffmandirt Feb 28th, 2006 6:57 AM

Well I can't implement an alogorithm in Turing if I have never heard of it. Not that I would do this kids homework, but it's the thought that counts I suppose.


All times are GMT -5. The time now is 10:52 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC