The maximum diameter of pure simplicial complexes and pseudo