I understood that pressure exerted by the liquid at the bottom of the container is the same if the depth of the water is the same, irrespective on the shape of the container. But what about the pressure exerted by these different shapes container on the table?
The pressure from the bottom of the container onto the table works the same irrespective of what you have in your container, as long as the weight is spread evenly. The pressure $P_t$ onto the table with a container with area $A$ and weight $M$ is simply $P_t = M/A$. The pressure in the liquid will depend on the depth from the liquid surface. With depth $h$, density $\rho$ and gravitational constant $g$ the water pressure $P_w$ is $P_w = \rho g h$.