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
- Graph Theory
- Bead Ornaments
- Discussions
Bead Ornaments
Bead Ornaments
Sort by
recency
|
27 Discussions
|
Please Login in order to post a comment
pyth 3 omptimized code: from functools import reduce from operator import mul
def beadOrnaments(b): return int((reduce(mul, (x ** (x - 1) for x in b), 1) * (sum(b) ** (len(b) - 2))) % (10 ** 9 + 7))
Here is my solution in java, javascript, python, C, C++, Csharp HackerRank Bead Ornaments Problem Solution
Here is the solution of Bead Ornaments Click Here
Link of the Bead ornaments problem explanation (in hindi): https://youtu.be/lTrgFiHw6ik