Question: This is for my basic C++ class. Please keep the code simple and not too complicated. Write a boolean function SEG that takes two arrays

 This is for my basic C++ class. Please keep the code

This is for my basic C++ class. Please keep the code simple and not too complicated.

Write a boolean function SEG that takes two arrays A and B and their lengths LA and LB, and returns TRUE if B is a segment of A, and FULSE if otherwise bool SEG(int All, int Bll, int LA, int LB) The examples of a TRUE function output include A 18 0 3 8 367 49 2 8 3 410 3] LA-15; B-I8 0 3]; LB-3 A [8 0 38 36 749 2834103 LA-15; B-18 3 67]; LB-4 A-18 03 8367 49 28 3 4 10 3] LA-15; B-12 8 3 4 1]; LB-5 The examples of a FALSE function output include A=[8 0 3 8 3 6 7 4 9 2 8 34 1031; B 0 3 1]; LB-3 LA-15; A-18 038367 49 283410 3] LA-15; B-[8 3 3 2]; LB-4 A=[8 0 3 8 3 6 7 4 9 2 8 3 4 1 03]: B-18 3 140]; LB-5 LA-15; Your "main" function should check all the 6 examples above, and all the 6 results should be included in your report

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!