Should be carefull when we use container.size() in the condition part of for iterator