Answer:
I am writing a Python function:
def is_maxheap(list):
#finds the length of the list
size=len(list)
#loop has a variable i which starts traversing from root til end of last #internal node
for i in range(int((size - 2) / 2) + 1):
if list[2 * i + 1] > list[i]: #If left child is greater than its parent then return #false
return False
if (2 * i + 2 < size and
list[2 * i + 2] > list[i]): #checks if right child is greater, if yes then #returns false
return False
return True
Explanation:
The function is_maxheap() traverses through all the internal nodes of the list iteratively. While traversing it checks if the node is greater than its children or not. To check the working of this function you can write a main() function to check the working on a given list. The main() function has a list of integers. It then calls is_maxheap() method by passing that list to the function. The program displays a message: "valid max heap" if the list represents valid max-heap otherwise it returns invalid max heap.
def main():
list = [10,7,8]
size = len(list)
if is_maxheap(list):
print("Valid Max Heap")
else:
print("Invalid Max Heap")
main()
The program along with its output is attached in a screenshot.
I would say the answer is D from process if elimination. First, news articles don't use second person as it's quite informal and news doesn't really need address the reader directly like that. Stories also don't really use "you" and thingsblike that as the story is probably about someone else and would be first or third person. Movie narrations also don't tend to use second person since it's not about the reader/audience and more about the characters in the movie so there wouldn't be a need. Now for video games, it does make sense that they would use second person since it's tge audience that is playing the game and might say "you killed blah blah blah". I hope my answer is right and I just went through some of my own reasoning above.
Answer:
The description of the discussion is summarized throughout the explanation segment elsewhere here.
Explanation:
- The operating quality would be an essential technology running on a computer. It maintains the recent memories but instead mechanisms including its desktop, along with all the latter's hardware as well as software components.
- Perhaps it facilitates communication with your device without learning how to read your device's dialect.
Answer:
A) Array of buttons for<u> quick access </u>to commonly used <u>commands and tools</u>: Tool bar
That's what most people will use most of the time, to quickly perform the most common tasks.
B) <u>List of commands</u> to create, format and edit presentations: Menu Bar.
When the features listed in the tool bar aren't enough, we go to the Menu system, which lists all the features of the program.
C) <u>Provides info</u> about current slide<u> at the bottom</u> of the slide: Status Bar.
The status bar is always located at the <u>bottom of the screen</u>.
D) <u>Provides navigation</u> through the slides: Scroll bar.
Where you can scroll down and up your slides.
There are only 3 primary colors
Red, Blue and Green are the only Primary colors.