Program To Check If A Given Array Is Sorted Or Not | FREE DSA Course in JAVA | Lecture 62

preview_player
Показать описание
During the course of the Array module of our free DSA course, we have many times worked on sorted arrays.

To clarify, a sorted array is one where all elements are in increasing order. For eg. 1,3,4,6,7,11,13,15 is a sorted array.

We can very easily solve this program using a very simple loop condition.

Check out this short program to know the exact algorithm in java to check whether a given array is sorted or not.

or call us at 8884881203

Рекомендации по теме
Комментарии
Автор

Your teaching is awesome sir, the opinion of any subject of students depends on the way of teaching

vijaya-narayan
Автор

sir that you had explained well clear I have one doubt for sorting array what about descending your code is only for ascending and increasing order

Nobi_
Автор

what if the input elements are 2 to check sorting for the same code. is it works

padma-vijk
Автор

but sir int []arr = stored in this [] bracket not in {} curly braces hot is it possible.

evolutionabhimanyusingh