11466

There should be a better approach to improve the time complexity.

 

11369

 

11059

 

10714

 

10533

 

644

 

11311

 

11716