All Questions
9 questions
1
vote
1
answer
575
views
Coin Flip Streaks script
I am attempting to complete the coin flip streaks problem from automate the boring stuff with python.
My code works fine but my only concern is the phrasing of the task.
Does the question want us to ...
2
votes
4
answers
275
views
A simplified regular expression matcher
I am working my way through some code challenges — partly to improve my problem solving, but also to improve my code quality.
I think my current (fully-functional) solution to a challenge is pretty ...
13
votes
2
answers
5k
views
Average spam confidence
Exercise 7.2 from Python for Informatics:
Write a program to prompt for a file name, and then read through
the file and look for lines of the form:
...
4
votes
1
answer
253
views
Regex to find variants of "Google"
From the HackerRank question definition:
The word google can be spelled in many different ways.
E.g. google, g00gle, g0oGle, g<>0gl3, googl3, GooGIe etc...
Because
g = G
o = ...
3
votes
0
answers
1k
views
Given an input string and a pattern, implement wildcard pattern matching
I have been trying to solve "Wildcard Matching" on leetcode. I know there are more "manual" ways to solve this without using the RE library. But I would like to know if passing the time limit is ...
10
votes
3
answers
3k
views
Imgur URL parser
Fairly new to Python, and I have been doing a few Edabit challenges, to better help with my problem-solving. I have just completed a some what semi-difficult challenge, and I was hoping for some feed ...
4
votes
3
answers
344
views
Remove repetitive strings from a given sentence efficiently
I recently gave a test on HackerRank:
Given a string, return the most concise string that can be formed from it.
For example:
...
2
votes
1
answer
1k
views
TDD: String Calculator Kata
String Calculator
Create a simple String calculator with a method int Add(string numbers).
The method can take 0, 1 or 2 numbers, and will return ...
4
votes
2
answers
375
views
Efficient use of regular expression and string manipulation
The following is my solution to Java vs C++. I think the way I have used the re library is inefficient, and possible erroneous as I am getting tle.
...