All Questions
6 questions
9
votes
4
answers
4k
views
Building string with max length
I need to run a evaluation for large (1 Million) number of components and build a string with error which has comma separated error codes. As the final string is to be persisted in RDBMS TABLE.COLUMN ...
10
votes
2
answers
8k
views
Converting Morse Code
Challenge
Write a program which reads a file containing Morse Code and outputs the conversion.
Specifications
The first argument is a path to a file.
The file contains multiple lines.
Each line ...
5
votes
1
answer
569
views
Test whether target string is substring of source string
The code is self-explanatory. It has \$O(n)\$ complexity, and it tells whether a given string is the substring of the source string. Are there any cases where this algorithm fails? Is there anything ...
5
votes
2
answers
470
views
Longest substring with unique characters
Find the length of the longest substring without repeating characters
Any comments on my code?
...
12
votes
4
answers
13k
views
Align Strings for Output
I wrote a class which can format input so that it is properly aligned.
I'm interested in all suggestions (regarding structure, usability, style, naming, comments, etc).
I'm especially wondering ...
7
votes
5
answers
791
views
Refactoring String manipulating method with TDD
I'd like to refactor my extractSimplePromptName test so it does the same but it's "prettier", hence less code. As far as looking at it, it seems like it could be ...