Skip to content
Advertisement

Tag: algorithm

codility absolute distinct count from an array

so i took the codility interview test yesterday and was informed today that i failed, unfortunately i wasnt given any other information by either codility nor the employer as to where i screwed up so i would appreciate some help in knowing where i went wrong. i know codility pays alot of emphasis on how fast the program runs and

Java – Collections.sort() performance

I’m using Collections.sort() to sort a LinkedList whose elements implements Comparable interface, so they are sorted in a natural order. In the javadoc documentation its said this method uses mergesort algorithm which has n*log(n) performance. My question is if there is a more efficient algorithm to sort my LinkedList? The size of that list could be very high and sort

Running out of java heap space- 15 puzzle problem

G’day all, I tried the solution for eight puzzle problem posted here by joel Neely and played around with it and modified it so that can be used to solve for higher grids[Changed the String representation of the grid to two dimensional integer representation and modified the logic accordingly]. However the modified code can solve the 3×3 grids but quickly

Advertisement