What is the maximum number of pieces with the shape T which can be placed within the 5 ×5
grid shown, without overlapping, and with their edges along the lines of the grid?
t shape and 5x5 grid

This problem is taken from the UKMT Intermediate Mathematical Challenges.