tutorbin

data structures and algo homework help

Boost your journey with 24/7 access to skilled experts, offering unmatched data structures and algo homework help

tutorbin

Trusted by 1.1 M+ Happy Students

Recently Asked data structures and algo Questions

Expert help when you need it
  • Q1: Northeastern University CET2200 – Data Structures and Algorithms Homework 4 1. Order the following functions by growth rate N, N1.5, N2, √N, NlogN, 2N. See Answer
  • Q2:2. An algorithm takes 0.5 ms for input size 100. How long will it take for input size 500 if the running time is the following (assume low order terms are negligible) a. Linear b. O(NlogN) c. QuadraticSee Answer
  • Q3:This assignment consists to two parts: In the first part you will compile and run the Array class implementation that is posted in the week 5 module. The Array class implements range checking to ensure that subscripts remain within the bounds of the Array. The class allows one array object to be assigned to another with the assignment operator. There is no need to pass the array size separately to functions that receive array parameters. Entire Arrays can be input or output using the stream insertion (>>) and stream extraction (<<) operators. You can compare Arrays with the equality operator (==). It is a powerful Array class. Check the results and post them on Canvas. The second part of the assignment has to do with duplicate elimination in an array of integers. Use a one-dimensional built-in array to solve the following problem. Read in 20 numbers, each of which is between 20 and 100 inclusive. As each number is read, validate it and store it in the array only if it isn’t a duplicate of a number already read. After reading all the values, display only the unique values that the user entered. Provide for the “worst case” in which all 20 numbers are different. Use the smallest array to solve this problem. Post the source files and the result on Canvas. See Answer
  • Q4:2. Distinguish between reprocessing and rollforward as database recovery techniques.See Answer
  • Q5:3. Distinguish between statement-level consistency and transaction-level consistency.See Answer
  • Q6:7. Briefly define the problems that can occur because of concurrent processing that are addressed by resource locking.See Answer
  • Q7:8. What is deadlock? How can it be avoided? How can it be resolved when it occurs?See Answer
  • Q8:9. Explain the term cursor. Explain why a transaction may have many cursors. Also, how is it possible that a transaction may have more than one cursor on a given table?See Answer
  • Q9:Let us create following BST original 50 30 70 20 40 60 80 delete 60 30 70 20 40 80 inorderSee Answer
  • Q10:What is an Abstract data type? How is it implemented in C++?See Answer
  • Q11:What is a default constructor? What is the advantage of having one?See Answer
  • Q12:Transform the declaration template<class T, int size = 50> class genClass { T storage[size]; .................. void memberFun() { ............ if (someVar < size) { ...... } ............ } }; which uses an integer variable size as a parameter to template, to a declaration of genClass which does not include size as a parameter to template and yet allows for flexibility of the value of size. Consider a declaration of genClass's constructor. Is there any advantage of one version over another? See Answer
  • Q13:The STL provides class templates that process lists, stacks, and queues. In a linked list, the order of the elements is determined by the order in which the nodes were created to store the elements. Iterators are used to step through the elements of a container. A vector container stores and manages its objects in a static array. An iterator is generated by member functions of containers. The functions begin, rbegin, rend, etc are members of iterators. The statement vector<int> vec[5] declares a vector of 5 elements. A linked list is a dynamic data structure. Item insertion and deletion from a linked list does not require data movement. The search on a linked list is sequential. See Answer
  • Q14:Fill in the blanks: A linked list is a list of items called ____ (elements, nodes, items) A _______ linked list can be traversed in either direction (singly-linked list, Circular linked list, doubly-linked list) Item insertion in a vector container is accomplished by using the operations _______ and ______ ( pop_back, insert, push_back) The three main components of STL are ____, _______, and ________. (algorithm, vector, iterator, deque, container) In a doubly linked list, item insertion and deletion requires the adjustment of ________ pointer(s) in a node (zero, pointer, two) See Answer
  • Q15:1. Use the STL stack container in a program that reads a string, an arithmetic expression to be exact, one character at a time, and determines if the string contains balanced parenthesis – that is, for each left parenthesis (if there are any) there is exactly one matching right parenthesis later in the string. Use the following strings to test your program. 1. A+ B- C 2. A * B / (C+10) 3. A * ((B / C) + D + (E-10) 4. A * (B / C) + D + (E-10)) Clearly describe the algorithm you will use to determine if the string contains balanced parenthesis. Document the program so I can follow what is going on. The output should look like this: String: A + B – C No parenthesis String: A * B / (C+10) Matching parenthesis String: A * ((B / C) + D + (E-10) Parenthesis don’t match. Missing right parenthesis String: A * (B / C) + D + (E-10)) Parenthesis don’t match. Missing left parenthesis [Hint: Read the expression left to right, one character at a time. If the character read is a left paren ‘(‘, Push the left paren onto the stack. If the character is a right paren ‘)’, pop the stack. If the character is neither, ignore the character. After all characters have been read, if the stack has left over parenthesis, the expression has unbalanced parenthesis, else the parenthesis are balanced.] See Answer
  • Q16:2. Use the STL queue (std:queue) container to implement a print queue that accepts incoming print jobs, named as PrintJob #1, PrintJob #2, etc. The print jobs arrive in random order in the sense that the first job might be PrintJob #4, the next one might be Printjob #1, etc. The print queue will look something like this: PrintJob #4 PrintJob #2 PrintJob #1 PrintJob #3 .. The program will generate the print job name strings (the digits are random numbers) and inserts these into the queue in the order received. After every second job inserted in the queue, the program will pop the job at the front of the queue displaying a message saying a particular job, identified by its name, is completed and the size of the queue. As each job is inserted in the queue, the program will display a message saying “Added PrintJob #n to the queue. Size of the queue is …”. Insert a total about 10 jobs to the queue. Please remember that the actions of adding jobs to the queue and every so often removing the job at the front of the queue should be interspersed. Submit the code and the output on Camvas. See Answer
  • Q17:What is the matching number of the bipartite graph shown above (i.e., what is the number of edges in a maximum matching)?See Answer
  • Q18:Which vertices are in the minimum vertex cover of the above graph? Select one or more: O u1 O u2 O u3 O u4 O v1 O v2 O v3 O v4See Answer
  • Q19:Consider an execution of Boyer-Moore with the pattern P="goggles" and a host string T. Assume that, with a shift value of i, the algorithm reads character T[i+6] and finds that this character is 'g'. By how much should the shift i be increased (according to the bad character rule)?See Answer
  • Q20:Consider the DFA for matching the string 'goggles'. Number the states from '0' (having matched no characters) to '7' (having matched the whole pattern). What is the target state of reading a character 'o' from state 3? (Please answer with a number only.)See Answer

TutorBin Testimonials

I found TutorBin Data Structures And Algo homework help when I was struggling with complex concepts. Experts provided step-wise explanations and examples to help me understand concepts clearly.

Rick Jordon

5

TutorBin experts resolve your doubts without making you wait for long. Their experts are responsive & available 24/7 whenever you need Data Structures And Algo subject guidance.

Andrea Jacobs

5

I trust TutorBin for assisting me in completing Data Structures And Algo assignments with quality and 100% accuracy. Experts are polite, listen to my problems, and have extensive experience in their domain.

Lilian King

5

I got my Data Structures And Algo homework done on time. My assignment is proofread and edited by professionals. Got zero plagiarism as experts developed my assignment from scratch. Feel relieved and super excited.

Joey Dip

5

TutorBin helping students around the globe

TutorBin believes that distance should never be a barrier to learning. Over 500000+ orders and 100000+ happy customers explain TutorBin has become the name that keeps learning fun in the UK, USA, Canada, Australia, Singapore, and UAE.