Preview

Marketing Mix of Alcoholic Beverage Companies

Good Essays
Open Document
Open Document
606 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Marketing Mix of Alcoholic Beverage Companies
Question 1

a) Two criteria that must be followed in constructing a binary tree so that it is complete.

-each node that has any children has exactly two children.

-the depth should be equal in both sides

b) Binary tree that satisfies max-heap property. (7,10,3,11,5,4,1,2,1,0,8)Values inserted into tree in the order given and tree is reorganized every time an item is added.

c) Given the following(10,30,74,63,2,65,5,21,97,64) construct a binary search tree. Values inserted in the tree in the order given.

d) Give the output of a pre-order traversal of the tree above.

NO IDEA

Question 2

a) What are the advantages and disadvantages of singly linked list over doubly linked list?

Advantages

1. Is a recursive data structure, because it contains a pointer to a smaller object of the same type. For that reason, many operations on singly linked linear list (such as merging two lists, or enumerating the elements in reverse order) often have very simple recursive algorithms, much simpler than any solution using iterative commands.

1. Linear singly linked lists also allow tail-sharing. This is the use of a common final portion of sub-list as the terminal portion of two different lists. In particular, if a new node is added at the beginning of a list, the former list remains available as the tail of the new one.

Disadvantages

1. They are not easy to manipulate, this is because they do not allow sequential access to the list in both directions like doubly linked list. For example In a doubly linked list, one can insert or delete a node in a constant number of operations given only that node's address but to do the same in a singly linked list, one must have the address of the pointer to that node, which is either the handle for the whole list (in case of the first node) or the link field in the previous node.

b) Importance of data structures.

-Is important since it

You May Also Find These Documents Helpful

  • Good Essays

    4. Find at least one use of parallel structure in the Declaration. What key terms are repeated in identical or equivalent constructions, and to what effect?…

    • 695 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Java

    • 5076 Words
    • 21 Pages

    Explanation: C) Binary is base 2. In Mathematics, numbers in base n are composed entirely of digits between 0 and n-1.…

    • 5076 Words
    • 21 Pages
    Good Essays
  • Satisfactory Essays

    An infinite loop is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over.…

    • 351 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    b) 10 Convert the one table in the previous question to a relational database design. Fill each table in your…

    • 1445 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Nt1310 Unit 1 Test Paper

    • 381 Words
    • 2 Pages

    3. Create a binary search function that tells whether a given value exists in the tree or not.…

    • 381 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Nt1420 Unit 6

    • 1145 Words
    • 5 Pages

    INSTRUCTIONS: 1. THERE ARE SIX (6) QUESTIONS IN THIS PAPER. 2. ANSWER FIVE (5) QUESTIONS ONLY. Question 1 Arrays are used when storing a large number of values. You are required to create an array named a and answer the following questions regarding array manipulation. a. Write a method fillRandom(int[] a, int min, int max), fill the array a with a random integer value. (Note: Math.random() returns a double in the range of 0.0 and 1.0, therefore it is cast to an integer number, between the minimum and maximum value). [6 marks] b. Write the Bubble sort method to sort array a into descending order. [10 marks] c. In the quicksort, an algorithm an element is chosen from the unsorted list. This element is called the…

    • 1145 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    CS 220 – Programming w/ Data Structures: You have missed one assignment and one quiz. Your instructor has extended your assignment due date to this Sunday, April 10. Your instructor has also let you to take your Quiz # 2 during his office hours during this week. Let me know if you need additional support to study for this quiz. Your grade to date in this class is 30.2/37 81.62% B.…

    • 354 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Info1105

    • 951 Words
    • 4 Pages

    Now if we traverse the list from head to tail, we always get a sorted list.…

    • 951 Words
    • 4 Pages
    Good Essays
  • Good Essays

    3) A description of at least two methods of sorting records and the benefits of each:…

    • 1173 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    List five advantages and five disadvantages of using case structures to program multiple alternative decisions…

    • 303 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    3.Which of the following are ways in which you can structure a record containing data? (Choose all that apply.)Answer: c. fixed-length and d. variable-length…

    • 1020 Words
    • 5 Pages
    Satisfactory Essays
  • Better Essays

    Graph Theory

    • 1587 Words
    • 7 Pages

    Definition. A path from node n1 to node nk is a sequence of nodes n1, n2, …, nk such that ni is the parent of ni+1 for 1 ≤ i < k. The length of a path is the number of edges in the path, not the number of nodes. Because the edges in a tree are directed, all paths are “downward”, i.e., towards leaves and away from the root. The height of a node is the length of the longest path from the node to any of its descendants. Naturally the longest path must be to a leaf node. The depth of a node is the length of the path from the root to the node. The root has depth 0. All leaf nodes have height 0.…

    • 1587 Words
    • 7 Pages
    Better Essays
  • Satisfactory Essays

    c. A device that works with binary data is called a DIGITAL device. (pg. 11)…

    • 388 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.…

    • 761 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    The advantage of using a tree structure is due to it’s ability of holding continuous real-world data, which can be added and deleted at any time.…

    • 2024 Words
    • 9 Pages
    Powerful Essays

Related Topics