Posts by Thomas E. • 41 points
2 posts
-
0
votes3
answers173
viewsQ: How to capture the numbers for a single line array?
I have to write a code in C++ in a question where, first, the user enters a number that determines the size of an array, and then, insert in a single row, separated by spaces, the numbers of that…
-
4
votes2
answers333
viewsQ: Calculate minimum number of permutations to sort
I received this question in a test, and I would like to know which ways to go. I have an array of distinct n integers, A = [A0, a1, ..., an-1]. I can swap any two elements of the array any number of…