What if I want to use sort function in descending order of lexicographical manner
e.g app, dpp, cop using sort function sort(s,s+n)
will return app,cop,dpp
but if I want it in reverse order what is the code.
What if I want to use sort function in descending order of lexicographical manner
e.g app, dpp, cop using sort function sort(s,s+n)
will return app,cop,dpp
but if I want it in reverse order what is the code.
@Souradeep-Kundu-824545687968212
hello Souradeep ,
u can do it by two ways
a) using inbuilt comparator greater < string >()
b) or u can pass ur own comparator.