codes for Problems i solved it