#459 Console Application with Bubble Sort

Companies:
Insyres
Themes:
AlgorithmsSortingPractice

Create a console application with the following functionality:

  • Prompt for the array size with the message "enter array size:";
  • Initialize an integer array of the specified size with random values;
  • Print the array with the heading "initialized array:";
  • Sort the array in ascending order using bubble sort;
  • Print the array with the heading "sorted array:".

The code must follow the Single Responsibility Principle.

Required:

  • Clarify the requirements if necessary;
  • Estimate the exercise completion time;
  • Write and demonstrate the code.

Question review

Mentor
Answer as you would in a real interview. I’ll ask follow-up questions, then compare your answer with the reference answer and show your accuracy as a %.
Sign in to start the dialogue The mentor keeps the context of the current question and your previous messages.
Sign in