coding-interview-in-java.pdf
7.4 MB
Coding Interview in Java
Which of the following is not a JavaScript Data Types?
Anonymous Quiz
10%
Boolean
40%
Undefined
30%
Float
20%
Number
What is the time complexity of searching for an element in a circular linked list?
Anonymous Quiz
47%
O(n)
35%
O(nlogn)
9%
O(1)
9%
O(n2)
Which of the following function of the Array object is used to add one or more elements to the front of an array and returns the new length of the array?
Anonymous Quiz
28%
splice()
42%
unshift()
11%
sort()
18%
toString()
Which of the following application makes use of a circular linked list?
Anonymous Quiz
18%
Undo operation in a text editor
41%
Recursive function calls
27%
Allocating CPU to resources
14%
Implement Hash Tables
Explanation:
Generally, round robin fashion is employed to allocate CPU time to resources which makes use of the circular linked list data structure. Recursive function calls use stack data structure. Undo Operation in text editor uses doubly linked lists. Hash tables uses singly linked lists.
Generally, round robin fashion is employed to allocate CPU time to resources which makes use of the circular linked list data structure. Recursive function calls use stack data structure. Undo Operation in text editor uses doubly linked lists. Hash tables uses singly linked lists.
Which of the following syntax is correct to refer to an external script called "LFC.js"?
Anonymous Quiz
18%
<script source="LFC.js">
27%
<script ref="LFC.js">
53%
<script src="LFC.js">
2%
<script type="LFC.js">
Which of the following syntax can be used to write "Hello World" in an alert box?
Anonymous Quiz
6%
alertBox("Hello World");
8%
msgBox("Hello World");
83%
alert("Hello World");
2%
msg("Hello World");
Which of the following is false about a circular linked list?
Anonymous Quiz
15%
Every node has a successor
24%
Time complexity of inserting a new node at the head of the list is O(1)
30%
Time complexity for deleting the last node is O(n)
31%
We can traverse the whole circular linked list by starting from any point