SPIA 101-120
40 Questions
5 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Lokalne varijable u funkcijama nalaze se na HEAP segmentu virtuelne memorije

False

Instrukcije programa nalaze se u TEXT segmentu virtuelne memorije.

True

Memorija se dodjeljuje procesu na HEAP dijelu pomoću

Stog služi za smještanje

Signup and view all the answers

Stog koristi sljedeće principe

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

Šta sadrži okvir stoga?

Signup and view all the answers

Registri procesora smješteni su u TEXT segmentu virtuelne memorije

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

Prilikom pokretanja programa na stogu se nalazi okvir

<p>main() funkcije</p> Signup and view all the answers

Šta je rekurzivna procedura?

Signup and view all the answers

Rekurzivna procedura obavezno mora imati

Signup and view all the answers

Za pohranjivanje podataka u rekurzivnim procedurama koristi se HEAP segment.

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

Fibonaccijev rekurzivni algoritam se značajno usložnjava povećanjem broja n za F(n)

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

Rekurzivna procedura mora uvijek napredovati prema osnovnom slučaju

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

Rekurzivni postupak je jednostavniji za napisati i za izvođenje u odnosu na obični

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

Polovljenjem veličine problema složenost funkcije se izražava kaoa)

<p>O(log2n)</p> Signup and view all the answers

Selection sort radi tako što nađe ______ član niza i zamjeni ga sa _______ članom niza

Signup and view all the answers

U algoritmu selection sorta vanjska petlja___________________, a unutrašnja _____________________________.

Signup and view all the answers

Složenost selection sorta je

<p>O(n^2)</p> Signup and view all the answers

Najgori slučaj kod selection sorta je

Signup and view all the answers

Najgori slučaj kod bubble sorta je

<p>naopako sortiran niz</p> Signup and view all the answers

Lokalne varijable u funkcijama nalaze se na HEAP segmentu virtuelne memorije

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

Instrukcije programa nalaze se u TEXT segmentu virtuelne memorije.

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

Memorija se dodjeljuje procesu na HEAP dijelu pomoću

Signup and view all the answers

Stog služi za smještanje

Signup and view all the answers

Stog koristi sljedeće principe

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

Šta sadrži okvir stoga?

Signup and view all the answers

Registri procesora smješteni su u TEXT segmentu virtuelne memorije

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

Prilikom pokretanja programa na stogu se nalazi okvir

<p>main() funkcije</p> Signup and view all the answers

Šta je rekurzivna procedura?

Signup and view all the answers

Rekurzivna procedura obavezno mora imati

Signup and view all the answers

Za pohranjivanje podataka u rekurzivnim procedurama koristi se HEAP segment.

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

Fibonaccijev rekurzivni algoritam se značajno usložnjava povećanjem broja n za F(n)

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

Rekurzivna procedura mora uvijek napredovati prema osnovnom slučaju

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

Rekurzivni postupak je jednostavniji za napisati i za izvođenje u odnosu na obični

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

Polovljenjem veličine problema složenost funkcije se izražava kaoa)

<p>O(log2n)</p> Signup and view all the answers

Selection sort radi tako što nađe ______ član niza i zamjeni ga sa _______ članom niza

Signup and view all the answers

U algoritmu selection sorta vanjska petlja___________________, a unutrašnja _____________________________.

Signup and view all the answers

Složenost selection sorta je

<p>O(n^2)</p> Signup and view all the answers

Najgori slučaj kod selection sorta je

Signup and view all the answers

Najgori slučaj kod bubble sorta je

<p>naopako sortiran niz</p> Signup and view all the answers

Study Notes

Memory Management

  • Local variables in functions are stored in the HEAP segment of virtual memory.
  • Instructions of a program are stored in the TEXT segment of virtual memory.
  • Memory is allocated to a process in the HEAP segment using...

Stack

  • The stack is used for storing...
  • The stack operates on principles of...
  • A frame on the stack contains...

Recursive Procedures

  • A recursive procedure must have...
  • Recursive procedures use the HEAP segment for data storage.
  • The Fibonacci recursive algorithm's complexity increases significantly with increasing n for F(n).
  • A recursive procedure must always progress towards the base case.
  • Recursive procedures are simpler to write and execute compared to...

Sorting Algorithms

  • Selection sort works by finding the ______ element of an array and swapping it with the ______ element.
  • In the selection sort algorithm, the outer loop _______, and the inner loop _______.
  • The complexity of selection sort is...
  • The worst-case scenario for selection sort is...
  • The worst-case scenario for bubble sort is...

Studying That Suits You

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

Quiz Team

Description

Test your knowledge about stack frames, recursion, and processor registers in computer programming. This quiz covers the content related to the stack, recursive procedures, and the placement of processor registers in the virtual memory TEXT segment.

More Like This

Use Quizgecko on...
Browser
Browser