Programming Quiz Channel
784 subscribers
81 photos
4 videos
1 file
Programming quizzes and knowledge tests

Short quizzes on programming, logic and computer science.

Test and improve your coding knowledge.
Join 👉 https://rebrand.ly/bigdatachannels

DMCA: @disclosure_bds
Contact: @mldatascientist
Download Telegram
What is the amortized time complexity of appending to a dynamic array (like Python's list or Java's ArrayList)?
Anonymous Quiz
17%
O(n) always, because it must resize every time
70%
O(1) amortized, even though occasional resizes cost O(n)
9%
O(log n) amortized
4%
O(1) worst case, every single append
What does the strict equality operator === check that == does not?
Anonymous Quiz
10%
Variable names
75%
Type in addition to value
8%
Memory address
8%
Nothing, they're identical
Topic: JavaScript

🔍 Quick look before the question:

function Counter() {
this.count = 0;
this.increment = function() {
this.count++;
};
}

const c = new Counter();
const inc = c.increment;
inc();
console.log(c.count);
What is the time complexity of searching in a balanced binary search tree?
Anonymous Quiz
8%
O(1)
42%
O(log n)
46%
O(n)
4%
O(n log n)
Topic: SQL

🔍 Quick look before the question:

SELECT e.name, e.salary
FROM employees e
WHERE e.salary > (
SELECT AVG(salary)
FROM employees
WHERE department = e.department
);