Array - linear data structure
- index(
pointer) manipulation - check
boundinloop skipelement to avoidduplicate- element
remove,replace,partation - use
HashMapto cache data two pointersused on sorted arraymath logicusually related withswapandreverse2Dindex manipulation- use
boolean arrayto cacheusedorvisitedstate - consider
each elementand then combine the result digitsmanipulation, use of acarrystateint[] arr = new int[n+1]In placemanipulation- use one pointer to move
- use two pointers to swap
- use value to store state, 0 or 1, or use equations to generate multiply states
- index usually involved with ‘
+1’ or ‘-1’ - usage of
sum - two pass,
forwardandbackword - shift k position –
triple reversion– (n-k)(1),k(2), n(3) slidig windowandMaporSetor TreeMap or TreeSet(ceiling(x), floor(x))- update
min1andmin2pointer