4 ms·
> strings are simply arrays of chars or code units/code points/grapheme clusters/emojis. Thanks to hard work of many developers string handling becomes easier
by bushin 9y ago
> strings are simply arrays of chars
or code units/code points/grapheme clusters/emojis. Thanks to hard work of many developers string handling becomes easier over time, but I don't think it's trivial if you don't exactly specify what you mean by "string" and "character".
- chadash 9y agoI think you and I are arguing semantics then. The very question "what do you mean by a string?" already indicates that you might be familiar with some of the differences between unicode and ascii, for example. In that case, I'll clarify what I mean depending on the language the candidate is most comfortable with. For example, if they plan to use C++, I might clarify that they can assume that the string is an array of chars containing letters a-z. I really just intend it as a filtering question, but someone can definitely get bonus points if they ask intelligent questions to clarify the problem.
- pastage 9y agoYou can't give those answers on computer aided code testing sites. That's why those tests needs to be long, verbose and boring so the questions will be obvious. The human touch.
- nilkn 9y agoI can't speak for chadash, but I'm pretty sure most folks who know to ask questions like this are probably going to pass the interview. They'll ask the right questions, and the problem will be simplified to a form that is solvable in a few minutes. So I don't think this is any major hurdle.