• + 0 comments

    This is my solution in Js:

        // Write your code here
        let sharedBill = bill.filter((item, index)=> index !== k).reduce((acc, ele)=>acc+ele,0)/2;
           
    console.log(sharedBill === b ? 'Bon Appetit' : b-sharedBill);
    }