Skip to main content

All Questions

Filter by
Sorted by
Tagged with
6 votes
2 answers
714 views

Weather Observation Station 8 query

Here's my (correct) solution to a HackerRank question: Weather Observation Station 8 Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last ...
JTB's user avatar
  • 277
2 votes
4 answers
307 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 ...
moyoka's user avatar
  • 43
1 vote
1 answer
603 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 ...
JerryTn's user avatar
  • 19
6 votes
1 answer
146 views

Extract strings from nested array in Perl

Extract the strings from nested arrays in Perl. It prints: a, b, c, d, E ...
Miroslav Popov's user avatar
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: ...
Mast's user avatar
  • 13.8k
2 votes
1 answer
611 views

Unique Email Addresses

The task was taken from leetcode Every email consists of a local name and a domain name, separated by the @ sign. For example, in [email protected], alice is the local name, and leetcode....
thadeuszlay's user avatar
  • 4,003
1 vote
2 answers
969 views

Find the smallest distance between any two given words in a string

The task: Find an efficient algorithm to find the smallest distance (measured in number of words) between any two given words in a string. For example, given words "hello", and "world" and a ...
thadeuszlay's user avatar
  • 4,003
4 votes
1 answer
256 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 = O ...
JaDogg's user avatar
  • 4,551
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 ...
Perplexabot's user avatar
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 ...
tightasbzip's user avatar
3 votes
1 answer
249 views

Advent of Code 2017, Day 7 - Recursive Circus

This is my solution to Advent of Code 2017, Day 7 – Recursive Circus (both parts, you might not be able to see the second part unless you're logged in and solved the first part, but I'll summarize it ...
mkrieger1's user avatar
  • 1,784
2 votes
0 answers
614 views

Leetcode 10: Regular Expression Matching

Problem statement Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching ...
Jianmin Chen's user avatar
  • 2,456
0 votes
2 answers
4k views

Matching whitespace and non-whitespace characters with RegEx

I just started watching some regex tutorials on Plural Sight just to learn how to write a proper regex expression. So far so good, it's been alright and I decided to test my knowledge on Hackerrank. ...
Tolani's user avatar
  • 2,501
4 votes
3 answers
213 views

Replacing a string until it matches a certain length

I'm trying to make an SMS Shortner for a kata at Codewars: Your task is to shorten the message to 160 characters, starting from end, by replacing spaces with camelCase, as much as necessary. I've ...
Abensur's user avatar
  • 143
4 votes
4 answers
204 views

Advent of Code Day 6: toggling lights in a grid with Powershell

I am using the "Advent of Code" series to help with my PowerShell education. The Day 6 puzzle has a 1000 × 1000 grid of lights. After processing instructions to turn on, turn off, or toggle rectangles ...
Collin Stump's user avatar

15 30 50 per page