1. Position of some Rectangular Ships (spanning max over 4 cells in a grid) is given. Some bullets are fired (each shot corresponds to a cell in the grid), Count the number of ships which got partially hit or completely hit (in this case they will sink). All the inputs were given in string. Ships were given as top left, bottom right grid cells. No duplicate shots.
2. template metaprogramming code for removing adjacent duplicates from a vector<int>.