Is initializing a char[] with a string literal bad practice?
I was reading a thread titled “strlen vs sizeof” on CodeGuru, and one of the replies states that “it’s anyways [sic] bad practice to initialie [sic] a char
array with a string literal.”
How do you compress ASCII strings into fewer bytes?
I’m working with an embedded device with a unique protocol that sends messages to other devices and I’m making an application that parses the sent packets. Each packet carries 8 bytes. The protocol is defined as where first byte is header and remaining 7 bytes is the data.
Algorithm Identification [ String & Dictionary ]
I recently heard of an interview question:
Try to find a word in the dictionary that has most letters given
I recently came across an algorithm design problem that I’d like some help with:
Index independent character comparison within text blocks
I have the following task: developing a program where there is a block of sample text which should be typed by user. Any typos the user does during the test are registered. Basically, I can compare each typed char with the sample char based on caret index position of the input, but there is one significant flaw in such a “naive” approach. If the user typed mistakenly more letters than a whole string has, or inserted more white spaces between the string than should be, then the rest of the comparisons will be wrong because of the index offsets added by the additional wrong insertions.
Longest subsequence without string
Does there exist a dynamic programming algorithm to find the longest subsequence in a string X that does not contain Y as substring? Just that this problem seems so similar to other DP string algorithms such as longest common subsequence and string. It must be able to handle occurrences of Y that overlap.
How to manage intermediate outputs efficiently?
I am implementing a C preprocessor in C…
How common is string manipulation, really? [closed]
Closed 10 years ago.
How common is string manipulation, really? [closed]
Closed 10 years ago.
How common is string manipulation, really? [closed]
Closed 10 years ago.