The block size determines your time complexity. For most problems, is optimal. You'll have blocks.
The last block might be smaller than if isn't perfectly divisible. Given index , its block number is .
Elements and are in the same block if . Block covers indices from to .
This indexing math is the foundation. Every sqrt decomposition algorithm uses it.