We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Coding Friends
- Discussions
Coding Friends
Coding Friends
Sort by
recency
|
8 Discussions
|
Please Login in order to post a comment
JavaScript
**Binary Search approach ** bool canSurpass(int samDaily, int kellyDaily, int difference, int days) { int samSolved = difference + days * samDaily; int kellySolved = days * kellyDaily; return kellySolved > samSolved; }
int minNum(int samDaily, int kellyDaily, int difference) { if (samDaily >= kellyDaily) { return -1; }
}****
JAVA Solution: