Answer:
Relation between initial speed of bullet and height h is given as

Explanation:
As we know that system of block and bullet swings up to height h after collision
So we have

so we have

so speed of the block + bullet just after the impact is given by above equation
Now we also know that there is no force on the system of bullet + block in the direction of motion
So we can use momentum conservation

now we have
