Home Work (HW)
8.Givenanarrayofnon-negativeintegers.Findthelargestmultipleof3thatcanbe
formedfromarrayelements.Forexample,iftheinputarrayis{8,1,9},theoutput
shouldbe“981”,andiftheinputarrayis{8,1,7,6,0},outputshouldbe“8760”.
9.Givenanarrayandanintegerk,findthemaximumforeachandeverycontiguous
subarrayofsizek.
Examples:
Input:
arr[]={1,2,3,1,4,5,2,3,6},k=3
Output:
3345556
Input:
arr[]={8,5,10,7,9,4,15,12,90,13},k=4
Output:
10101015159090
69
School of Computer Engineering