Problem 325. 2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise
Examples:
'Macbeth' -> false 'Publius Cornelius Dolabella' -> true
Note: sometimes it's the littlest things that matter....
Solution Stats
Problem Comments
-
8 Comments
Show
5 older comments
AMITAVA BISWAS
on 28 Feb 2012
this is a great problem iff delivered as audio but not as video...
AMITAVA BISWAS
on 28 Feb 2012
Liked it, emphasizes the old advice - examine the exam first, answer the exam later ...
David Young
on 29 Feb 2012
But B is not the same as b!
Richard Zapor
on 1 May 2012
The default call routine has numbers "2" but the check routine expects "two" to be the function call name.
Jan Orwat
on 4 Aug 2013
I'm just curious, cause the description doesn't specify it clearly (and there is no test for this): what the output should be when input has more than two b's?
Anupam Agarwal
on 17 Oct 2014
filename cannot start with a number.
Varoujan
on 5 Jul 2015
Tricky problem - fools the solver with the function name...
Michael Jarboe
on 6 Sep 2018
FUNCTION NAME STARTS WITH A NUMBER! BLAH! CHANGE 2--> two
Solution Comments
Show commentsProblem Recent Solvers396
Suggested Problems
-
1552 Solvers
-
1365 Solvers
-
716 Solvers
-
642 Solvers
-
726 Solvers
More from this Author39
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!