Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CSC 1351 Final Exam Questions and Answers

Beoordeling
-
Verkocht
-
Pagina's
8
Cijfer
A+
Geüpload op
22-01-2025
Geschreven in
2024/2025

CSC 1351 Final Exam Questions and Answers

Instelling
Vak

Voorbeeld van de inhoud

CSC 1351 Final Exam Questions and
Answers

Recursion - ANSWER-The same computation occurs repeatedly

Recursive Computation - ANSWER-Solves a problem by using the solution to the same
problem with simpler values

In many cases, a recursive solution is easier to understand and implement correctly
than an iterative solution - ANSWER-True

Occasionally, a recursive solution runs much slower than its iterative counterpart -
ANSWER-True

In most cases, the iterative and recursive approaches have comparable efficiency -
ANSWER-True

Measuring Execution Time - ANSWER-long start= System.nanoTime(); //code to be
executed long elapsed = System.nanoTime() - start;

palidrome - ANSWER-a word, sequence or phrase that reads the same forward as it
does backwards, for example words like 'dad', 'mom', 'madam' or numbers like '11',
'121', or '99099'.

A word is a palindrome if - ANSWER-1. The first and last letters match

2. Word obtained by removing the first and last letters is a palindrome

Fibonacci sequence - ANSWER-A sequence of numbers in which each number is the
sum of the preceding two.

Measuring Execution Time - ANSWER-long start = System.nanoTime();
//code to be executed
long elapsed = System.nanoTime() - start;

Sorting arrays is one of the most important operations in programming - ANSWER-True

Algorithm - ANSWER-- A sequence of instructions to solve a problem

-A process or set of rules to be followed in calculations or other problem-solving
operations, especially by a computer

, Bubble Sort - ANSWER-Moving through a list repeatedly, swapping elements that are in
the wrong order.

Selection Sort - ANSWER-A sorting routine that uses a nested loop process to
systematically select the best value among the unsorted elements of the array for the
next position in the array, starting with position zero all the way to the end.

Insertion Sort - ANSWER-A simple sorting algorithm that builds the final sorted array (or
list) one item at time. It is much less efficient on large lists than more advanced
algorithms such as quicksort, heapsort, or merge sort.

Merge Sort - ANSWER-Sorts an array by cutting the array in half Recursively sorting
each half, merging the sorted values.

Which algorithm is associated with "Divide and Conquer"? - ANSWER-Merge Sort

collection - ANSWER-groups together elements and allows them to be retrieved

Lists - ANSWER-A collection that remembers the order of its elements

The two implementations of the Map interface - ANSWER--HashMap
-TreeMap

HashMap - ANSWER-The Hashmap provides an unsorted, unordered Map. With a Map
the elements are not ordered. HashMap allows one null key and multiple null values in a
collection

TreeMap - ANSWER-Red-Black tree based NavigableMap implementation. It is sorted
according to the natural ordering of its keys. TreeMap class implements Map interface
similar to HashMap class.

TreeMaps order items by - ANSWER-Key & in alphabetical order

stacks Remove items ____ - ANSWER-in thee opposite order than they were added

Stacks let you ____ and _____ elements - ANSWER-insert, remove

Stacks order - ANSWER-LIFO

LIFO - ANSWER-Last-in, first-out

The stack push operation - ANSWER-adds a single element to the top

The stack pop operation - ANSWER-Remove the top element

Geschreven voor

Vak

Documentinformatie

Geüpload op
22 januari 2025
Aantal pagina's
8
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$11.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
EXAMHAVEN

Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
EXAMHAVEN Havard School
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
4
Lid sinds
1 jaar
Aantal volgers
2
Documenten
1615
Laatst verkocht
4 maanden geleden

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen