design stack support follow operationsimplement CustomStack classcustomstackint maxsize Initializes object maxsize maximum number element stack stack reach maxsizevoid pushint x Adds x stack stack have not reach maxsizeint pop Pops return stack 1 stack emptyvoid incint k int val Increments k element stack val if k element stack increment element stack Example 1inputcustomstackpushpushpoppushpushpushincrementincrementpoppoppoppop31223451002100outputnullnullnull2nullnullnullnullnull1032022011explanationcustomstack customstack new CustomStack3 Stack Empty customstackpush1 stack 1customstackpush2 stack 1 2customstackpop return 2 return stack 2 stack 1customstackpush2 stack 1 2customstackpush3 stack 1 2 3customstackpush4 stack 1 2 3 do not add element size 4customstackincrement5 100 stack 101 102 103customstackincrement2 100 stack 201 202 103customstackpop return 103 Return stack 103 stack 201 202customstackpop return 202 return stack 102 stack 201customstackpop return 201 Return stack 101 stack customstackpop return 1 Stack return 1 Constraints1 maxSize 10001 x 10001 k 10000 val 100at 1000 call method increment push pop separately