ail m ▸YouTube Maps N Electrical and Comp... 98°F Sunny hackerrank.com/test//2df2kaiaq3/questions/np712m6m BETA Can't re
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
ail m ▸YouTube Maps N Electrical and Comp... 98°F Sunny hackerrank.com/test//2df2kaiaq3/questions/np712m6m BETA Can't re
questions/np712m6m BETA Can't read the text? Switch theme 1. Is Possible Consider a pair of integers, (a, b). The following operations can be performed on (a, b) in any order, zero or more times. • (a, b)→→→ (a+b, b) • (a, b)→→→ (a, a + b) Return a string that denotes whether or not (a, b) can be converted to (c, d) by performing the operation zero or more times. Example (a, b) = (1, 1) (c,d)=(5,2) 5 4 3 Classes Perform the operation (1, 1+ 1) to get (1, 2), perform the operation (1+2, 2) to get (3, 2), and perform the operation (3+2, 2) to get (5, 2). Alternatively, the first operation could be (1+1, 1) to get (2, 1) and so on. The diagram below demonstrates the example representing the pairs as Cartesian coordinates: (1,1+1) (3+2,2) Zoom
ail m ▸YouTube Maps N Electrical and Comp... 98°F Sunny hackerrank.com/test//2df2kaiaq3/