Stores curr_remainder and the most recent index at which curr_remainder has occurred
Dictionary < int , int > map1 = new Dictionary < int , int > ( ) ; map1 . Add ( 0 , - 1 ) ; int curr_remainder = 0 ;