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.
funchappyLadybugs(bstring)string{// Write your code herevarArray[26]intvaradj[]intvarspaceintcount:=1forindex,char:=rangeb{ifchar=='_'{space++continue}Array[int(char)-65]++ifindex>0{ifrune(b[index-1])==char{count++}else{adj=append(adj,count)count=1}}}adj=append(adj,count)ifspace==0{for_,a:=rangeadj{ifa==1{return"NO"}}return"YES"}for_,count:=rangeArray{ifcount==1{return"NO"}}return"YES"}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Happy Ladybugs
You are viewing a single comment's thread. Return to all comments →
Golang: