Worst fit algo places the processes in such a way that the maximum possible hole is created out of the various possibilities.
Given : partition sizes-P1:100k P2:500k P3:800k P4:300k P5:600k
Process 1:212k So we will allocate it to P3(it will give us the biggest hole possible) size of hole=800-212=588k
Process2:417k it will be allocated to P5 ,hole=600-417=183.
Process 3:112k it will be allocated to the hole of P3 : new hole=588-112=476
Process 4:426k It will be allocated to P2: hole=500-426=74
order of allocation: P3 P5 P3 P2