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.
- Prepare
- Algorithms
- Warmup
- Compare the Triplets
- Discussions
Compare the Triplets
Compare the Triplets
Sort by
recency
|
4180 Discussions
|
Please Login in order to post a comment
This is my solution.
def compareTriplets(a, b): ra = 0 rb = 0 for i in range(len(a)): if a[i] > b[i]: ra += 1 elif a[i] < b[i]: rb += 1 return ra, rb
What are some practical tips for choosing gambling games that can provide more fun and less risk?
def compareTriplets(a, b):
def compareTriplets(a, b): # Initialize scores for both a and b counta, countb = 0, 0