We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Functions
- Querying the Document
- Discussions
Querying the Document
Querying the Document
Sort by
recency
|
150 Discussions
|
Please Login in order to post a comment
In a higher level langauge, you'd just append the arrays, so I went with that idea.
Some tests have mistakes. To pass this task you can add code:
Works similarly to a normal tokenizer. Nothing crazy. Realloc is used instead of assuming the number of words/sentences/paragraphs in the document.
C Solution :
The split() function splits a string into an array of strings according to the 'delim' char argument and it updates the int pointer 'count' to the length of the array of strings. I used this function to do splits: document -> paragraphs, paragraphs -> sentences, sentences -> words.
I hope the reader finds the comments useful.