Company: Global_logic_4_dec
Difficulty: medium
Bills Bundle Problem Description Given a bundle of bills containing N banknotes, each banknote ranging from 1 to 1000 dollars is represented by and in order A 1 , A 2 , ..., A N . If two banknotes have the same value, X , one after the other, remove both banknotes and replace them with a single note with the value X + 1 . This operation will reduce the size of the bundle by 1. Find the minimum number of banknotes in the bundle you can obtain after performing such operations a certain number of times. Function Description In the provided code snippet, implement the bankNotes(...) method to find the minimum number of banknotes in the bundle after performing the operations. You can write your code in the space below the phrase "WRITE YOUR LOGIC HERE". Input Format The first line contains an integer N , denoting the number of banknotes. The next line contains N space-separated integers, denoting the values of the banknotes in the array A . Output Format The output contains an integer denot