Skip to main content

All Questions

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
6 votes
3 answers
384 views

Leetcode - First Unique Character in a String

Given a string, find the first non-repeating character in it and return its index. If it doesn't exist, return -1. Examples: ...
Mosbius8's user avatar
  • 787
3 votes
1 answer
5k views

Codewars "Consecutive strings" kata

The challenge description is as follows: You are given an array strarr of strings and an integer k. Your task is to return the ...
Phrancis's user avatar
  • 20.5k
5 votes
1 answer
2k views

Finding common elements, ignoring duplicates, in two given string arrays

I am going through the CodingBat exercises for Java. Here is the one I have just completed: Start with two arrays of strings, a and ...
alanbuchanan's user avatar
  • 1,312