This is the follow-up question of the previous Hibernate interview question. If you answer the last query correctly then you would be most likely asked this one.
Here are some strategies to solve the N+1 problem:
1) pre-fetching in batches, will reduce the N+1 problem to N/K + 1 problem where K is the size of the batch
2) subselect fetching strategy
3) disabling lazy loading