Квиз по Python: Python Coding Interview Questions

This Python quiz prepares you for the coding round of an interview. It tests the Big-O cost of common operations, which data structure fits a problem, and patterns like two pointers, hash map lookups, memoization and binary search.

Сложный 10 вопроса ~8 минуты Проходной балл: 80% Python 3.12

Выберите режим

Вы играете как гость: войдите, чтобы сохранить XP и серию.

Пример вопроса

Вопрос 1 из 10

What is the average time complexity of x in s when s is a set with n items?

Показать ответ

C. O(1) Sets and dicts are hash tables, so finding an item takes constant time on average. The same x in s on a list is O(n), because Python checks items one by one.

Что проверяет этот квиз

  • Big-O of in, pop and other list, set and dict operations
  • Picking a set, dict, deque or heap for a task
  • Two pointers and the dict-based two-sum
  • Recursion limits and memoization with lru_cache
  • Binary search with bisect

Частые вопросы

Нужен ли аккаунт?

Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.

Какая версия Python?

Python 3.12. Каждый вопрос о выводе программы проверен запуском кода.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.