All Questions
8 questions
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 ...
2
votes
1
answer
372
views
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 ...
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
...
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 ...
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 ...
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 ...
9
votes
1
answer
5k
views
Merge sort in Scala
I've implemented merge sort in Scala:
...