Question
[Java Programming - Creative Thinking Exercise] I need help with the following creative thinking exercise.I had posted this exact question a couple days ago except,
[Java Programming - Creative Thinking Exercise]
I need help with the following creative thinking exercise.I had posted this exact question a couple days ago except, I failed to mention that this exercise is for Java Programming only. ------------------ I am given the following scenario and based on it I'm supposed to answer the following questions: 1. How will you keep the atomic weights associated with the abbreviations for the atomic names? 2. What sort of sorting algorithm would you use to search the bonding possibilities? 3. After the new molecules are found, how will you store them to be searchable in a reasonable amount of time? *** Explain why your solution is the best, and explain what BigO() time you can expect because of your choice and why**
Some of the sorting algorithms available to me are: Selection Sort, Merge Sort, Insertion Sort, Heap Sort, Quick Sort (2Way Partitioning and/or 3Way Partitioning)
Some of the means of storing available to me are: Heap (Min. heap and/or Max heap, Binary heap), Stack, Que, Priority Que, Binary Search Tree/Binary Tree, 2-3 Tree and/or Red-Black Binary Search Tree, KD-Tree, Weighted Quick Union Tree, Arrays, ArrayList, Circular Que, Symbol Table, Linked List.
The following tree traversals were also provided as a resource: PreOrder, InOrder, PostOrder, and LevelOrder.
**My thinking** Q1. I was thinking the best way to keep the atomic weights associated with the abbreviations would be to use a SymbolTable. I chose this because a SymbolTable stores items using a Key-Value pair system. Therefore the atomic weights and abbreviations are stored in a manner in which they are kept together. Q2. I'm unsure about which sorting algorithm to use in order to have maximum efficiency with this particular exercise, but I was thinking about QuickSort. I've noticed that on average QuickSort tends to have the most efficient performance overall. My thinking is oversimplified, so please help me open up my thinking/correct my thinking. Q3. I'm a bit confused about what exactly this question is asking, but if I am understanding correctly I think the best way to store the newly found molecules would be to store them in a Binary Tree. The reason behind my thinking is because Binary Trees are formed in a manner of parent-child relationships. Since molecules are being bonded to form new molecules, the molecules that are bonded are the parents of the newly formed molecule which is now the child.
Any help or guidance received, is greatly appreciated. Thanks in advance!
Step 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