Search Header Logo

Quiz ADT linked list 20-12-66

Authored by noi pc

Computers

1st Grade

Used 2+ times

Quiz ADT linked list 20-12-66
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

จากส่วนของโปรแกรมที่กำหนดให้ จงหาค่า Big O

O(1)

O(n)

O(n2)

O(logn)

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

จาก loop ที่กำหนดให้ มี Big O เท่าใด

O(1)

O(n)

O(n2)

O(n3)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

ถ้า head เป็น pointer ชี้ที่ linked list และ data เป็นข้อมูลที่จะทำการ insert

ข้อใดเป็นเงื่อนไขเป็นเงื่อนไขที่จะ insert data ด้านหน้า linked list

if(data < head->value)

if(data > head->value)

if(data < head)

if(data > head->next)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

กำหนด p=head;

while(p->next !=NULL)

p=p->next;

เมื่อ loop while ทำงานสิ้นสุดลง ค่า p จะมีค่าเท่าใด

19

NULL

2000

1080

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

main โปรแกรมต้องการเรียกใช้ function insert ดังนี้

struct record *head=NULL;

cin >> data;

head=insert(data, head);

ในส่วนของ function insert ตรงหัวฟังก์ชันควรเขียนโปรแกรมอย่างไร

struct record *insert(head, data)

struct record *insert(struct record *head, int data)

struct record *insert(int data, struct record *head)

struct record insert(int data, struct record *head)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

กำหนด loop ดังนี้

temp=head;

while(temp!=NULL)

{ cout << temp->value;

temp=temp->next->next;

}

ผลลัพธ์ที่แสดงบนจอภาพคืออะไร

4 5 10 15 20

4 10 20

5 15

4 10

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

เมนโปรแกรม เรียกใช้งาน function print()

int main()

{

struct record *head=NULL;

.......

print(head);

บริเวณหัวฟังก์ชัน print ควรเขียนอย่างไร

void print(struct record head)

void print(struct record *head)

struct record *print(head)

struct record print(struct record *head)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?