/generic findmaxwith function objectc+style /preconditiona size template const object findmaxconst vector arrcomparator islessthan int maxindex forint arr size)++ ifislessthanarrmaxindex ]arri maxindex ireturn arrmaxindex ]/generic findmaxusing default ordering #include template const object findmaxconst vector arr return findmaxarrless)class caseinsensitivecompare publicbool operator)const string lhsconst string rhs const return strcasecmplhs c_str)rhs c_str }int mainvector arr "zebra""alligator""crocodile}cout <findmaxarrcaseinsensitivecompare<endlcout <findmaxarr <endlreturn figure using function object +stylewith second version of findmaxoutput is zebrathen crocodile