GlobalLogic Interview Question

Logic coding questions ,star pattern,oops concepts