All Questions
5 questions
3
votes
2
answers
593
views
Find the longest sub string of a word after concatenation of given words array
An Array of N words is given. Each word consists of small letters ('a'-'z'). Our goal is to concatenate the words in such a way as to obtain a single word with longest possible substring composed of ...
1
vote
1
answer
500
views
Reinterpreting a string, treating < as a backspace character
I've come up with a solution to this coding challenge using recursion. In summary, the input is a string where the < symbol represents a backspace (up to 1 ...
3
votes
1
answer
282
views
Parsing n lines to count vowels - HackerEarth
I have written a haskell program for the following 'Code Monk' Challenge at HackerEarth.
Here is the challenge description. Basically, we are looking for the number of vowels in a string. The first ...
11
votes
2
answers
452
views
You need to diversify your strings
Challenge:
Write a program which prints all the permutations of a string in alphabetical order.
Specifications:
Your program should accept a file as its first argument.
The file contains input ...
5
votes
3
answers
5k
views
Using recursion to count substrings (with exceptions to the rule) in Java
I am going through the CodingBat exercises for Java. Here is the one I have just finished:
Given a string, compute recursively the number of times lowercase hi ...