Peel and chop the pineapple into small dices. In a saucepan, add the pineapple, brown sugar, cinnamon and butter and cook on low flame till it gets stewed. Allow to cool completely.
In a saucepan, whisk together the milk, egg yolks, sugar, corn flour, vanilla and salt till homogenous.
Cook on low flame, whisking constantly till the pudding base thickens. Take off the flame and allow it to cool.
Whip the egg whites with the icing sugar till stiff peak and set aside.
Preheat oven to 180 degrees. Keep a 9 inch pan ready.
Spread half of the wafers at the bottom. Top with half of the pineapple mixture and then half the pudding.
Repeat the second layer as above.
Now spread the stiff egg white on top to cover.
Bake for around 15-20 minutes, till the top is browned.
Serve warm with ice cream or whipped cream.