A memory system may include a memory device including a plurality of memory blocks each memory block including a plurality of pages; and a controller suitable for non-sequentially selecting some pages among a plurality of pages included in an open block among the plurality of blocks, checking a program state or an erase state of each of the selected pages, and searching for a boundary page between the program state pages and the erase state pages among the plurality of pages.