Easiest way to sort an array in C++ using sort() inbuilt function

preview_player
Показать описание
how to sort an array in C++ is shown
Рекомендации по теме
Комментарии
Автор

Just slow down and include everything you want to say. They say "Show, don't tell". Show us what and why its time complexity is.

Thank you for this amazing video. Simple and to the point explaination.

anshulmanapure
Автор

Great video helped me so much thank you

ahsanraza
Автор

sort(arr, arr+1) i didn't understand how arr+l is going to do sorting till last

rhishishranjan
Автор

Doesn't work..

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main(){

int Array[] = {0, 2, 5, 4, 1, 6};
int length = sizeof(Array) / sizeof(Array[0]);
sort(Array, Array+1);



for (int i = 0; i < length; ++i) {

cout << "sorted " << Array[i] << endl;

}



My code

alexanderpetranov
visit shbcf.ru