Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.