12 April 2017

deleteDigit

My solution:
int deleteDigit(int n) 
{
    return int.Parse(n.ToString().Select((c, i) => n.ToString().Remove(i, 1)).Max());;
}

Previous Next