ru
Feedback
Programming Quiz Channel

Programming Quiz Channel

Открыть в Telegram

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

Больше
790
Подписчики
+124 часа
+77 дней
+1530 дней
Архив постов
What is the primary advantage of a hash map over a balanced binary search tree for key-value storage?
Anonymous voting

What does the 'volatile' keyword guarantee for a Java field?
Anonymous voting

What does this print, in order?
Anonymous voting

Topic: Python 🔍 Quick look before the question:

def outer():
    x = 10
    def inner():
        nonlocal x
        x += 5
        return x
    return inner

f = outer()
print(f())
print(f())

What is a primary key's main purpose in a relational table?
Anonymous voting

Which of these creates a shallow copy of a list in Python?
Anonymous voting

What is the practical difference between Object.is(NaN, NaN) and NaN === NaN?
Anonymous voting

Which isolation level allows a transaction to read data another concurrent transaction has written but not yet committed?
Anonymous voting

What does this print?
Anonymous voting

Topic: Debugging & Code Output 🔍 Quick look before the question:

def outer():
    result = []
    for i in range(3):
        def inner():
            return i
        result.append(inner)
    return [f() for f in result]

print(outer())

Why is wrapping both UPDATEs in a single transaction important here?
Anonymous voting

Topic: SQL 🔍 Quick look before the question:

BEGIN TRANSACTION;
UPDATE accounts SET balance = balance - 200 WHERE id = 1;
UPDATE accounts SET balance = balance + 200 WHERE id = 2;
COMMIT;

What gets printed?
Anonymous voting

Topic: Debugging & Code Output 🔍 Quick look before the question:

for i in range(5):
    if i == 3:
        continue
    print(i)

In Python, what is the result of 3 ** 2?
Anonymous voting

What does Array.prototype.map() return?
Anonymous voting

What does the SQL DISTINCT keyword do?
Anonymous voting

What will counter reliably print, and why?
Anonymous voting

Topic: Java 🔍 Quick look before the question:

public class Test {
  static int counter = 0;

  static synchronized void increment() {
    counter++;
  }

  public static void main(String[] args) throws InterruptedException {
    Thread t1 = new Thread(() -> {
      for (int i = 0; i < 1000; i++) increment();
    });
    Thread t2 = new Thread(() -> {
      for (int i = 0; i < 1000; i++) increment();
    });
    t1.start(); t2.start();
    t1.join(); t2.join();
    System.out.println(counter);
  }
}

Which Python keyword defines a named function?
Anonymous voting