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.
Apple and Orange
Apple and Orange
Sort by
recency
|
3042 Discussions
|
Please Login in order to post a comment
Here is my c++ solution, you can see the explanation here : https://youtu.be/YJVWinC21Fg
TypeScript Solution 1. Declare orange and apple amount variables 2. Declare pointer variable 3. Loops until pointer is length of apple array - 1 while checking if apples and oranges aat that index are within the range of s to t 4. Checks if there are more oranges in the orange array 5. Begins to loop through the oranges array from where it left off in the last loop 6. Console log apple and orange amounts
PHP solution