Waste less time on Facebook — follow Brilliant.
×

Strings - Basic

     

Write a program to decide if a string is a palindrome or not. Is the following string a palindrome?

1
AJKMLNFDBKSTRUBJQAZWSQWERTYUIOPFUNASDFGHJKLXLKHJGFDSANUFPOIUYTREWQSWZAQJBURTSKBDFNLMKJA 

Write a function that returns number of times a substring occurs in a string.

In the string below how many times does the string "EAT" occur?

1
EATAUDRYBERNITAEATVIVANBROOKSEATJENIEATMICHALELASANDRALATIAEATLIDIAEATDEANDRAEATSYBILEATMONROEEATLATRISHAALTAEATDERICKROSANNLEVILIBBYKIRSTENCHARLESEATELLYNEATJANEEEATSTASIAEATJULIETTARANDIEATNORBERTSAGEEATARACELIKATINAMERNAEATISAIASWINNIEEATARLETHAEATMILOCAMIEEATANNABELEATLEANORABERTHASYBLECHANAEATREAGANERICKVALENTINAEATDORETHEASEBASTIANKRISROBERTAEATIVONNEEAT

Given an ASCII string, find the sum of all the numeric characters in the string. For example, for 'abc1234z' the sum of all numeric characters is \(1 + 2 + 3 + 4 = 10\). What is the sum of all the numeric characters in the string below?

1
'96h11k4959q615948s50922o38h1453ij38w73413d5577lzrqw3780b389750vf100zd29z73j5wh73l6965n85vm77cw10awrjr29265289222238n10013uk10062f9449acbhfgcm35j78q80'

×

Problem Loading...

Note Loading...

Set Loading...