Assignment project for campus-recruitement drive of Bobble.ai
The assignment had two problem statements, and both of the problems were related to trie data structure. The assignement solution had to be written in C++.
-
Parse a dictionary (in CSV format) which contains words along with their occurrence frequencies. This trie data structure's object instance should be serialized so that later search operations can be directly performed on this trie data structure rather than building it again and again from the original CSV file.
-
A dictionary of words is given, with all the words indexed from 0 to
N(whereNis the total number of words present in the dictionary). Store these words in a trie data structure so that a search operation can be performed on the index which will return the actual word itself.
Clone the repository and move to project's root directory:
git clone git@gitlab.com:saranshabd/bobble-ai-assignment.git
cd bobble-ai-assignmentMake sure you are using a Linux environment to run this project. In case you are using another operating system, use the following command to run an Ubuntu 18.04 image inside a Docker container:
docker run -it --rm -v $(pwd)/NodeTest:/usr/src/app ubuntu:18.04 bashRun the following command to build binaries of the assignment project files:
make buildOnce the binaries have been created, you can run the solution code of each of the assignments using the following commands:
./dict_conversion.out $(word-to-search)./reverse_search.out $(index-to-search)