Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
10 votes
4 answers
3k views

First non-repeating Character, with a single loop in Python

I recently tried to solve the first non-repeating character problem. Please tell me if my solution is valid. I'm aiming for O(n) with a single loop. My thinking is, it would be easy to tell you what ...
zing's user avatar
  • 203
7 votes
2 answers
827 views

Number of occurrences of strings in array

This is a Hackerrank problem (https://www.hackerrank.com/challenges/sparse-arrays/problem). We're given an array of strings and an array of queries, and have to return an array of the number of ...
jeremy radcliff's user avatar
4 votes
1 answer
178 views

Count the number of words and lines that have multiple vowels

I am working on this coding problem: Count the number of words & lines that have more than X vowels for every Y words in every Z line. Basically the input string has multiple lines and I need to ...
Naphstor's user avatar
  • 143
1 vote
1 answer
486 views

Removing a specific character and its neighbors from a string

Assume we have an string that contains the character 'c'. This character can be located anywhere within the string. The exercise ...
CodesInValley's user avatar
12 votes
2 answers
140 views

Re-arranging an obfuscated address

I'm getting address (physical address, not digital) input that's obfuscated, and looks like the following: The plaintext version: ...
Quill's user avatar
  • 12k
4 votes
1 answer
3k views

Lingo game using Python

You guess a word, and if its letter(s) is in the same spot as a hidden word's, you add [] around the letter. If it's in the hidden word, but not in the same spot, you add()). As of now, I have a ...
Anonmly's user avatar
  • 41