Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can anyone help me write this C++ program using tokenizers, 2-D arrays, and Insertion Sort? Please, and thank you! If possible, provide screenshots of the
Can anyone help me write this C++ program using tokenizers, 2-D arrays, and Insertion Sort? Please, and thank you!
If possible, provide screenshots of the program's output as well. I'm just starting to teach myself C++, so any pointers or tips will be much appreciated!
5.14 Coding lab: 2-dimensional arrays, a string tokenizer, insertion sort, and selection sort Important, please read! Make sure you use the specified struct name and function prototypes, as they will be referred to as such in the unit tests Please feel free to introduce additional subroutines (i.e, functions) to help you implement the required functions, although they will not be tested The main objectives of this lab include: set up a 2D array (or matrix) with proper initial values using vector of vectors given a string, implement a tokenizer to identify all the unique tokens contained within this string and the number of times (ie frequency) a given token appears in this string create a new datatype using struct to hold a token and its frequency, further store all the tokens and their frequencies into a vector implement the insertion sort algorithm to sort the list of tokens in increasing order of frequency implement the selection sort algorithm to sort the list of tokens in decreasing order of frequency Submit a single cpp program for grading. You are required to develop your program on a local IDE first. Then submit it for grading. You can submit your solution for grading up to 50 times 1. Implement the following function to create a matrix of dimensionality numRows x numCols, where matrix starts with an initial size of 0 Furthermore, initialize the value at matrix0l to the product of i and j vold matrix1n1t( vectr >& matrix, int numRows, int num cols) ; For example, if numRows is 3, numCols is 4, you are going to allocate space to matrix so that it contains three row vectors, where the size of each row vector will be 4. At the end of this function call, the content of matrix will be size of matrix matrix [0] [0]=0 matrix [ 0 ] [ 1 ] =0 matrix [0] [2]#0 matrix [0] [3]=0 matrix[1] [01-0 matrix [1] [1]=1 matrix[1] [212 ma tri 1-3 is: 3x4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started