Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with these problems. Thank You! This is page 25 ****Do all problems in both C++ and in Java. Any problem that uses

image text in transcribed

Please help me with these problems. Thank You!

image text in transcribed

This is page 25

****Do all problems in both C++ and in Java. Any problem that uses the java.util.*, cstring, or string library will get O credit. (15 points) Create a Generic Array class that defines all the methods for Array given in the Data Structures Basics PowerPoint presentation (page 25) (10 points) Given an array A of n positive odd integers, each represented with k = log n1+1 bits, write an O(n)-time method for finding a k-bit integer not in A. (10 points) Given an array A of n arbitrary integers, write an O(n)-time method for finding an integer that cannot be formed as the sum of two integers in A. (10 points) Given an unsorted array, A, of integers and an integer k, write a recursive algorithm for rearranging the elements in A so that all elements less than or equal to k come before any elements larger than k. What is the running time of your algorithm on an array of n values? (15 points) Create a custom string class. This class should be based of using the generic array in the previous problem using the character elements. Methods needed for full credit strlen strlwr strupr strcat strcpy strcmp (20 points) Use self commenting code and write meaningful comments for each problem. Refer to google style guide. (20 points) In your comments write runtime and algorithmic approximation for each problem. Common Array operations Is Empty Is Equal Remove Duplicates Print Sort Insert At Search Filter** Length/Size Of Shuffle O Remove At Slice ****Do all problems in both C++ and in Java. Any problem that uses the java.util.*, cstring, or string library will get O credit. (15 points) Create a Generic Array class that defines all the methods for Array given in the Data Structures Basics PowerPoint presentation (page 25) (10 points) Given an array A of n positive odd integers, each represented with k = log n1+1 bits, write an O(n)-time method for finding a k-bit integer not in A. (10 points) Given an array A of n arbitrary integers, write an O(n)-time method for finding an integer that cannot be formed as the sum of two integers in A. (10 points) Given an unsorted array, A, of integers and an integer k, write a recursive algorithm for rearranging the elements in A so that all elements less than or equal to k come before any elements larger than k. What is the running time of your algorithm on an array of n values? (15 points) Create a custom string class. This class should be based of using the generic array in the previous problem using the character elements. Methods needed for full credit strlen strlwr strupr strcat strcpy strcmp (20 points) Use self commenting code and write meaningful comments for each problem. Refer to google style guide. (20 points) In your comments write runtime and algorithmic approximation for each problem. Common Array operations Is Empty Is Equal Remove Duplicates Print Sort Insert At Search Filter** Length/Size Of Shuffle O Remove At Slice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago