9) Determine "Time Complexity" function and Big O( ) notation of the following loop structure. for (int i = 0; i <= n; i++) { for (int j = 0; j < 570; j++){ printf ("Selam"); }} 10) What does the following function do for a given Linked List with the first node as the head? void myFunction(struct node* head) { if (head == NULL) return; myFunction(head->next); printf("%d ", head->value); }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
9,10
nges the elements of the
list of
e list after the function
«t; };
->value = temp;
unction for the given
-t);
of steps by using a binary
dining 8190 integers?
to access any data within a data array
B.7 C. 16 13 E. 20
e input size of the
A. 5
7) What is the functionality of the following code for a given
linked list which has more than one node?
struct Node { int data; Node *next; };
void function (Node *node, int a) {
Node *tmp, *cur;
for(cur= node; cur->next !=null; cur = cur->next);
tmp->data = a;
tmp = new Node;
tmp->next = NULL; cur->next = tmp; }
A. Inserting a node at the end of the list.
B. A syntax error occurs
C. A separate new node that is independent from the linked
list is created in the computer memory
D. Inserting a node as the first node of the list.
E. Inserting a node as the second node of the list.
8) The following postfix expression with single digit
operands is evaluated using a stack:
? A. 1,58,12 6,1 D. 4,6 E. 3, 2
n
842/2+3* +51*-
The top two elements of the stack after the first "*" is
evaluated are:
9) Determine "Time Complexity" function and Big O( )
notation of the following loop structure.
for (int i = 0; i <= n; i++) {
for (int j = 0; j<570; j++) {
printf ("Selam");
}}
21
sit to tabon x
edt to sosia
decorage
10) What does the following function do for a given Linked
List with the first node as the head?
void myFunction(struct node* head) {
if (head == NULL) return;
myFunction(head->next); printf("%d ", head->value); }
Transcribed Image Text:nges the elements of the list of e list after the function «t; }; ->value = temp; unction for the given -t); of steps by using a binary dining 8190 integers? to access any data within a data array B.7 C. 16 13 E. 20 e input size of the A. 5 7) What is the functionality of the following code for a given linked list which has more than one node? struct Node { int data; Node *next; }; void function (Node *node, int a) { Node *tmp, *cur; for(cur= node; cur->next !=null; cur = cur->next); tmp->data = a; tmp = new Node; tmp->next = NULL; cur->next = tmp; } A. Inserting a node at the end of the list. B. A syntax error occurs C. A separate new node that is independent from the linked list is created in the computer memory D. Inserting a node as the first node of the list. E. Inserting a node as the second node of the list. 8) The following postfix expression with single digit operands is evaluated using a stack: ? A. 1,58,12 6,1 D. 4,6 E. 3, 2 n 842/2+3* +51*- The top two elements of the stack after the first "*" is evaluated are: 9) Determine "Time Complexity" function and Big O( ) notation of the following loop structure. for (int i = 0; i <= n; i++) { for (int j = 0; j<570; j++) { printf ("Selam"); }} 21 sit to tabon x edt to sosia decorage 10) What does the following function do for a given Linked List with the first node as the head? void myFunction(struct node* head) { if (head == NULL) return; myFunction(head->next); printf("%d ", head->value); }
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of trees
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education