Posts by Flavio Mendes • 1 point
3 posts
-
0
votes1
answer59
viewsQ: Keysorting using Ordereddict?
The code below shows that the elements are ordered with odd keys in descending order and those with even keys in ascending order, but are not being ordered according to the rule. from collections…
-
0
votes2
answers654
viewsA: How to remove last element from a chained list using position?
I managed to solve it, but not in the right way: import java.io.IOException; import java.util.Scanner; class No { int val; No prox; No(int x) { val = x; } } public class Main { public static No…
-
-1
votes2
answers654
viewsQ: How to remove last element from a chained list using position?
I am wanting to remove the last element from a chained list by typing position n: when I type 1,2,3,4,5 of and n=2, I want it to stay 1,2,3,5 but it’s giving 1,2,3. import java.io.IOException;…