Posts by Juliana • 35 points
4 posts
-
1
votes0
answers31
viewsQ: Dijkstra Algorithm with Priority Queue - Why and Poll are not working, is my logic wrong?
I’m trying to apply the algorithm of Dijkstra using Priority Precise to leave it with logarithmic complexity T(N) = E*log(n) The first node manages to find its neighbors and relax its values but the…
-
1
votes2
answers2437
viewsQ: Invert Simple List
EXERCISE: Write a method that inverts a linked list: Entree: 10, 99, 101, 666 Expected Result: 666, 101, 99, 10 I thought to follow the following logic: It would arrive until the last element (666)…
-
1
votes1
answer1412
viewsQ: (JAVA) Help in Sorting Exercise (Selection Sort and Insertion)
/*EXERCISE: Write a method that puts in ascending order a disordered sequence of n integer. (a) Using sorting by selection (b) Using sorting by insertion*/ I tried to solve the exercise, but I’m…
-
0
votes1
answer100
viewsQ: Odd results when calculating factorial
I can’t find the error in my code. When I put numbers smaller or equal to 12 my program gives the right result, but from the number 13 the values come out wrong and I can not know why. What’s the…