@2.07 line 19 it is said a is staring point how???
a isnt starting point it is array isnt it?? and ending is a+n how??? n is last symbol but a is array than how are we adding a and n?
Inbuilt STL doubt
@tejasddongare,
actually , a is the pointer to the starting element of the array a, you can verify it by running
cout<<(*a)<<endl; you will get the value of the starting value of the array , so according to the official documentation of c++, stl sort(first,last) ,first and last are the initial and final positions(addresses) of the sequence to be sorted. The range used is [first,last) (notice ‘)’ ) , which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
so in short , in sort function , you need to provide it a range on which sort function sorts , so
in the vedio first = a (because it is the pointer to the first element), and last=a+n (it is the pointer to the next address block of last element , which is not included).
This might be little tricky to understand , but do ask any doubt you are having in this