Function to check HP
if ( checkIsHP ( arr , n ) ) { System . out . print ( " Yes , ▁ A ▁ HP ▁ can ▁ be ▁ formed " + "NEW_LINE"); flag = 1 ; } else if ( flag == 0 ) { System . out . print ( " No " ) ; } } }