A
A
Alexander Krylov2018-10-15 03:40:43
Algorithms
Alexander Krylov, 2018-10-15 03:40:43

Algorithmic language, sorting and deleting elements, how to code?

Greetings, comrade. I had one problem here, in the educational process of a secondary specialized educational institution I encountered such a problem, its essence is that initially there was a passage of the topic on arrays "Removing elements from an array", and now "Sorting". But the problem is that in practical sorting tasks, sorting needs to be mixed with removing elements from the array, and how this is done has not been explained in any way and is not explained anywhere. Urgent help is required, because the exam is already on Wednesday. The task has the following condition: Enter an array of N integers. Remove all negative elements from it, sort the remaining values ​​in ascending order using the permutation method, display the sorted array on the screen. Or here's another one: 2. Enter an array of N integers. Find the minimum value in it, sort the elements between the first element and the minimum value in descending order using the “bubble” method. Display the resulting array on the screen.
I would be grateful, an explanation is welcome, both in the form of flowcharts and in algorithmic language.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Clark Kent, 2018-10-15
@sancez2

Read the terms carefully:
These are three different parts of the problem. Do it one after the other.
The same goes for the second task:

Display the resulting array

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question