There is an area made with N 1x1 squares, and all parts of area are connected (there are no inaccessible square from any square). Here are some examples of area.
I want to select some squares in this area, and two adjacent squares cannot be selected together(diagonally touching is not adjacent).
Can I find maximum quantity of selected squares within time complexity O(N)? And how can I do?
Thank you very much.
