#Jio code gladiator 2nd code Neighbours and party Print the elements of maximum sum of non-adjacent element in array Examples :
Input : arr[] = {5, 5, 10, 100, 10, 5} Output : 51005 //maximum sum 5+100+5=110
Input : arr[] = {1, 2, 3} Output : 13 //maximum sum 1+3=4
Input : arr[] = {1, 20, 3} Output : 20 // maximum sum 20 = 20