Just to further confuse, stone walls can absorb a surprising amount of water without being weakened very much. What this does affect though is how fast flooding will be - as if the walls are already full of water they leakage will be faster.

So the question is, "how damaged are the foundation walls?" If they are very damaged, then the castle will collapse in minutes, if they are fairly intact, then it could remains tanding for months. Equally the flooding could be minutes or days, it all depends on the degree of damage they have received.