Java code for range maximum query and updates
import java . util . Arrays ; import java . util . HashSet ; import java . util . Set ; class GFG { static Set < Integer > fibonacci = new HashSet < > ( ) ;