Answer to Question #53852 in C for super ascii string checker

Question #53852
In the Byteland country a string "S" is said to super ascii string if and only if count of each character in the string is equal to its ascii value.
In the Byteland country ascii code of 'a' is 1, 'b' is 2 ...'z' is 26.
Your task is to find out whether the given string is a super ascii string or not.
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Anu
10.06.20, 09:36

Ans in python: S=input () L=[] for i in range(0,26): L.append(i) L[i]=0 for i in range(0,len(s)): K= ord(s[i]-97 L[k]=l[k]+1 for i in range(0,26): C=0 if (l[i]==i+1 or l[i]==0): C=1 else: C=0 break if(c!=0): print("yes") else: print("no")

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS