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.
Weighted Uniform Strings
Weighted Uniform Strings
Sort by
recency
|
781 Discussions
|
Please Login in order to post a comment
Python
Java O(N)
Simple C++ Solution, video here : https://youtu.be/xhpzPQBB9ts
https://github.com/Achintha444/problem-solving-hackerrank-js/blob/main/85-weighted-uniform-strings.js
JS answer
**python ** def weightedUniformStrings(s, queries): """ Determines if each query value is a valid weight of a substring in the given string.
if name == 'main': s = input() queries_count = int(input().strip())