• + 0 comments
     if(n<k)return n-1;
        else if(n==2 || n==1 || n==0)
       return 0;
        return k-1;
    why this approach fails and give me some failure test cases