Below are data structures and algorithms practice tests! Data structures are sets of data that are prepared in a certain way so as to make it easier for them to be processed. The quiz below is designed to test out just how much you know about different algorithms, order, and preorder of data. Do check it out and keep a lookout for others like it!
Swift has Optionals, whereas Java 7 does not.
Swift has Structs, whereas Java 7 does not.
Swift Classes are value types, unlike Java Classes, which are reference types.
Swift and Java both have primitives.
Swift has enums, whereas Java does not.
Swift has Type Inferencing, while Java does not.
Both Swift and Java allow you to use tuples as parameters.
Strings are references types in both Java and Swift.
A regular Array in Swift is mutable if you declare it using var, while a regular Array in Java is immutable regardless of how you declare it.
The given Node belongs at the beginning and should replace the head because it is less than the head.
The given Node belongs at the end.
The given Node does not belong anywhere.
The given Node belongs in the middle.
The given Node cannot be inserted because the Linked List is full.
Error checking in case the given Node is entered incorrectly.
Left, Head, Right
Head, Left, Right
Right, Left, Head
Right, Head, Left
Right, Head, Left
Head, Right, Left
Left, Right, Head
Head, Left, Right
Left, Head, Right
Right, Head, Left
Left, Right, Head
Head, Left, Right
True
False
Big O of n
Big O of n^2
Big O of logn
Big O of nlogn
Head: Big O of n Tail: Big O of logn
Head: Big O of 1 Tail: Big O of n
Head: Big O of 2n Tail: Big O of nlogn
Head; Big O of n^3 Tail: Big O of n^5
Big O of logn
BigO of n + n
Big O of nlogn
Big O of n
Big O of n^3
Big O of n
Big O of logn
Big O of nlogn
12 10 8 15 25 16 20
You cannot perform an inOrder transversal.
8 10 12 15 16 20 25
25 16 20 15 12 10 8
Return fib (n - 2) + fib(n - 3)
Return fib(n - 1) + fib(n - 2)
Return fib(n - 1) * fib(n - 2)
Return fib(n)