Binary Tree Operations

OptimisticMagicRealism avatar
OptimisticMagicRealism
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

What is the ready state of a process?

When process is unable to run until some task has been completed

What is a set of processes in deadlock if?

Each process is blocked and will remain so forever

Which of the following are CPU scheduling algorithms?

All of the mentioned

In which storage placement strategy is a program placed in the largest available hole in the main memory?

<p>Best fit</p> Signup and view all the answers

What is a measurement that defines the level of inter-dependability among modules of a program?

<p>Coupling</p> Signup and view all the answers

What are the advantages of modularization in software design?

<p>Components with high cohesion can be re-used again</p> Signup and view all the answers

Which type of test determines if the system meets the entire requirements (functional and nonfunctional)?

<p>Acceptance test</p> Signup and view all the answers

How is generalization implemented in Object-Oriented software engineering?

<p>Inheritance</p> Signup and view all the answers

When searching for a key in a binary tree, what should you do if the searched key is less than the root?

<p>Go to the left</p> Signup and view all the answers

Which keyword is used to deallocate the space taken by a node?

<p>delete</p> Signup and view all the answers

Which type of node is easier to delete from a binary tree?

<p>Leaf node</p> Signup and view all the answers

What is the characteristic of an algorithm that requires it to terminate after a finite number of steps?

<p>Finiteness</p> Signup and view all the answers

Which of the following refers to the process of defining the mathematical bound of an algorithm's runtime performance?

<p>Asymptotic analysis</p> Signup and view all the answers

Which algorithm is based on the dynamic programming approach?

<p>Chess playing algorithm</p> Signup and view all the answers

Which algorithm traverses a graph in a breadth-ward motion and uses a queue to remember vertices to visit?

<p>Breadth first search</p> Signup and view all the answers

What is true about static websites?

<p>Their content will not be changed unless the actual webpage file is edited</p> Signup and view all the answers

What is a common component of a use case description?

<p>Trigger</p> Signup and view all the answers

What is a preferred way for adding a background color in HTML?

Signup and view all the answers

Which document is created by a system analyst after collecting requirements from stakeholders?

<p>Software Requirement Specification</p> Signup and view all the answers

What is the method used to get the result from the form data sent with both GET and POST?

<p>$_REQUEST</p> Signup and view all the answers

Which of the following is NOT a characteristic of objects in object-oriented design?

<p>Objects can manage themselves</p> Signup and view all the answers

Which one of the following is a server-side scripting language?

<p>ASP</p> Signup and view all the answers

What is the mechanism that allows objects in a class hierarchy to have different methods with the same name?

<p>Polymorphism</p> Signup and view all the answers

What is the pop-up box used to display information to the user in JavaScript?

<p>Alert</p> Signup and view all the answers

What is the process of translating system specifications into a formal or semi-formal model?

<p>Elicitation</p> Signup and view all the answers

When does a page fault occur?

<p>The page does not present in memory</p> Signup and view all the answers

What is a disadvantage of object-oriented design?

<p>Objects are difficult to maintain</p> Signup and view all the answers

Which one of the following is a condition that causes a deadlock?

<p>All of the above</p> Signup and view all the answers

What is a grammar that produces more than one leftmost derivation for a sentence called?

<p>Ambiguous grammar</p> Signup and view all the answers

What is the intersection of a context-free language and a regular language?

<p>Both regular and context-free</p> Signup and view all the answers

What is an operating system?

<p>All of the above</p> Signup and view all the answers

Which one of the following scheduling algorithms allocates the CPU first to the process that requests the CPU first?

<p>FCFS</p> Signup and view all the answers

Study Notes

Binary Search Tree

  • When searching from a binary tree, if the searched key is less than the root, go to the left.
  • If the searched key is larger than the root, go to the right.
  • If the searched key is equal to the root, go to the left.

deallocating Space

  • The keyword "delete" is used to deallocate the space taken by a node.

Node Deletion

  • Deleting a leaf node is easier to perform.
  • Deleting an internal node is more complex.

Algorithm Characteristics

  • An algorithm must terminate after a finite number of steps, which is called finiteness.
  • An algorithm's time complexity refers to the mathematical bound/framing of its run-time performance.
  • An algorithm's space complexity refers to the amount of memory it uses.

Algorithm Design Approaches

  • Dynamic programming is a design approach used in algorithms like the chess playing algorithm.
  • Optimal merge pattern is an example of dynamic programming approach.
  • Divide and conquer is another design approach used in algorithms like merge sort.
  • Greedy is a design approach used in algorithms like the optimal merge pattern.
  • Backtracking is a design approach used in algorithms like chess playing.

Graph Traversal

  • Breadth-first search (BFS) traverses a graph in a breadth-ward motion and uses a queue to remember to get the next vertex to start a search, when a dead end occurs in any iteration.

HTML

  • The attribute used in the body tag to change the default font color for the page is the "text" attribute.
  • The "bgcolor" attribute is used to set the background color of the page.

Static Website

  • A static website's content will not be changed unless the actual webpage file is edited.
  • It is also referred to as flat pages or stationary pages.
  • The content remains the same for all viewers of the website.

Server-Side Scripting

  • PHP, ASP, and Python are server-side scripting languages.

JavaScript

  • A popup box used to display information to a user in JavaScript is called an alert box.

CSS

  • The code `` defines an external style sheet called styles.
  • The preferred way to add a background color in HTML is by using the "style" attribute.

Form Data

  • The $_REQUEST method is used to get the result from the form data sent with both GET and POST.

MySQLi

  • The mysqli_connect() method is used to connect to a database, and the password is an optional parameter.

SQL

  • The correct update statement is UPDATE student SET name="abel" WHERE ID="123";.

Page Fault

  • A page fault occurs when the page does not present in memory.

Deadlock

  • Deadlock occurs when a set of processes is blocked, and each process is waiting for another process to release a resource.
  • The conditions that cause deadlock are mutual exclusion, hold and wait, circular wait, and no preemption.

Operating System

  • An operating system is a system service provider to the application programs.
  • It is a collection of programs that manages hardware resources.
  • It is an interface between the hardware and application programs.

Process Scheduling

  • The ready state of a process is when the process is waiting for the CPU to become available.
  • The FCFS (First-Come, First-Served) scheduling algorithm allocates the CPU first to the process that requests the CPU first.
  • The priority scheduling algorithm allocates the CPU based on the priority of the process.
  • The round-robin scheduling algorithm allocates the CPU in a cyclic order.
  • The shortest job scheduling algorithm allocates the CPU to the process with the shortest burst time.

Storage Placement

  • The best fit strategy places a program in the largest available hole in the main memory.
  • The first fit strategy places a program in the first available hole in the main memory.
  • The worst fit strategy places a program in the smallest available hole in the main memory.
  • The buddy strategy places a program in a hole that is exactly of the same size.

Modularization

  • Modularization is a technique that divides a program into smaller components.
  • It has advantages such as easier maintenance, reusability, and divided development.

Requirement Engineering

  • The requirement engineering process involves requirement gathering, feasibility study, software requirement specification, and requirement validation.
  • The software requirement specification (SRS) is a document that outlines the requirements of the software.

Testing

  • Unit testing is a testing technique that tests individual units of code.
  • Integration testing is a testing technique that tests the integration of units of code.
  • System testing is a testing technique that tests the entire system.
  • Acceptance testing is a testing technique that tests the entire system to ensure it meets the requirements.

Object-Oriented Software Engineering

  • Generalization is implemented in object-oriented software engineering using inheritance.
  • Aggregation is a mechanism that allows objects to contain other objects.
  • Composition is a mechanism that allows objects to contain other objects, and the contained objects cannot exist independently.
  • Polymorphism is a mechanism that allows objects to have different methods with the same name.

Test Case Development

  • A test case is a set of inputs, actions, and expected results.
  • A test case should be developed based on the requirement specification.
  • It should be reviewed and validated before execution.

UML

  • Use case description commonly contains precondition, main scenario, and alternative scenarios.
  • Aggregation, composition, and generalization are concepts used in UML.

Object-Oriented Design

  • Object-oriented design is a design approach that uses objects to represent real-world entities.
  • It has advantages such as easier maintenance, reusability, and divided development.
  • However, it can be difficult to maintain and understand.

Grammar

  • A grammar is a set of rules that define the structure of a language.
  • An ambiguous grammar is a grammar that produces more than one leftmost derivation for a sentence.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team
Use Quizgecko on...
Browser
Browser