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
|
761 Discussions
|
Please Login in order to post a comment
Python3
There is a problem with my code rectify this anyone please
int[] arr=new int[s.length()]; List l=new ArrayList<>(); // arr[0]=int(s.charAt(0)-96); int cnt=0; for(int i=0;i0 && s.charAt(i-1)==s.charAt(i)) { cnt++; arr[i]=arr[i-1]*cnt; } else { cnt=1; // arr[i]=(s.charAt(i)-'a'+1);
}
python3
Python