Skip to main content

All Questions

Tagged with
0 votes
1 answer
646 views

Sort Stack using just an additional stack

The problem is from the cracking coding Interview programming book. The problem is that: Sort Stack: Write a program to sort a stack such that the smallest items are on the top. You can use an ...
sweetyBaby's user avatar
2 votes
1 answer
372 views

Sorting lists by various measures of goodness [closed]

...
Azula's user avatar
  • 139
3 votes
0 answers
732 views

Parallel Merge Sort in Scala

I have been trying to implement parallel merge sort in Scala. My current implementation is about as fast as .sorted, but I have no idea what would be the right ...
warbaque's user avatar
  • 261
3 votes
2 answers
2k views

Bubble sort in Scala

I wanted to implement a bubble sort in Scala following the steps described in: http://www.bbc.co.uk/education/guides/z22wwmn/revision/3 ...
Gids's user avatar
  • 133
3 votes
1 answer
327 views

Is there a better way to return values with merge sort?

I have been attempting to learn Scala lately and so have produced a couple of different sorting algorithms to build up my basics. I think I have been lucky with the methods returning exactly what I ...
BoydyBoydy's user avatar
5 votes
3 answers
712 views

How can I make my isSorted function faster? [closed]

I made an isSorted function in Scala and Java as well and when I measured the time of functions' run I saw that the Scala version was very slow. It ran about 3.2 ...
bitli's user avatar
  • 161
1 vote
1 answer
311 views

Counting inversions

I'm trying to implement an inversion counting routine in Scala in a functional way (I don't want to port Java solution) but have real troubles with it. The sorting routine works fine but adding the ...
synapse's user avatar
  • 131
9 votes
1 answer
5k views

Merge sort in Scala

I've implemented merge sort in Scala: ...
chris's user avatar
  • 415