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 और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 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, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

कौन-सा Python वर्ज़न?

Python 3.12। आउटपुट वाले हर सवाल को कोड रन करके जांचा गया है।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।