All Questions
4 questions
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 ...
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:
...
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 ...
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 ...