Advanced Search
Search Results
156 total results found
Sliding Window
Key terms: Fixed Size Subarray Maximum/Minimum Subarray Consecutive/Continuous Elements Longest/Shortest Substring Optimal Window Substring/Window/Range Frequency Count Non-overlapping/Subsequence Sum/Product/Average in a Window Smallest/Largest W...
Getting Started
1] Read (and Reread) Carefully and Understand the Problem Putting the problem in your own words is a powerful way to solidify your understanding of the problem and show a potential interviewer you know what you’re doing. Ask Questions to Clarify Doubt: See...
Brute Force
A brute force solution is an approach to problem-solving that involves trying all possible solutions exhaustively, without any optimization or algorithmic insight. In a brute force solution, you typically iterate through all possible combinations or permutatio...
Object Oriented Basics
Yes, all the object-oriented programming (OOP) terms and concepts mentioned apply to Python. Python is a multi-paradigm programming language that fully supports object-oriented programming. In fact, OOP is one of the primary programming paradigms used in Pytho...
Encapsulation
Class Creation Considerations: Encapsulation: the bundling of Variables and Methods in a Class to ensures that the behavior of an object can only be affected through its Public API. It lets us control how much a change to one object will impact other ...
Abstraction
Prereq: Inheritance Abstraction is used to hide something too, but in a higher degree (class, module). Clients who use an abstract class (or interface) do not care about what it was, they just need to know what it can do. Abstract class contains one or mor...
Inheritance
Inheritance is a mechanism that allows a class to inherit properties and behaviors from another class. PRO: Promotes code reuse and establishes relationships between classes. CON: Increases Coupling Inheritance is based on a hierarchical relationshi...
Polymorphism
Class Polymorphism Polymorphism is often used in Class methods, where we can have multiple classes with the same method name. For example, say we have three classes: Car, Boat, and Plane, and they all have a method called move(): Different classes with the ...
Big O
How should we describe the speed of an algorithm? One idea is to just count the total number ofprimitive operations it does (read, writes, comparisons) when given an input of size n. For example: The thing is, it's hard to come up with a formula like this, ...
Recursion
Parallel Programming
https://www.youtube.com/watch?v=X7vBbelRXn0 High performance programming Multiprocessing Pros Separate memory space Code is usually straightforward Takes advantage of multiple CPUs & cores Avoids GIL limitations for cPython Eliminates most need...
Data Structures
Array arr = [1, 3, 3, 7] for val in arr: # 1,3,3,7 7 in arr # True, takes O(n) arr[3] # 7 arr[3] = 8 arr.pop() # delete last element arr.append(9) # insert last element del arr[1] # delete, takes O...
Basics Cheatsheet
Built-in # primitives x = 1 # integer x = 1.2 # float x = True # bool x = None # null x = float('inf') # infinity (float) # objects x = [1, 2, 3] # list (Array) x = (1, 2, 3) # tuple (Immutable Array) ...
Q and A
Here are some questions that interviewers may ask to test your basic knowledge of object oriented design principles. What is a... Class: A class is a fundamental building block in object-oriented programming. It serves as a blueprint for defining obj...
Design a Parking Lot
Starting an object-oriented design interview for a parking lot scenario involves several key steps to ensure a structured and thorough approach. Here's a suggested outline: Clarify Requirements: Begin by asking clarifying questions to fully understand ...
Concepts
Objects are representation of real world entities Data/attributes Behavior Classes are "classified" as blueprints, template, or cookie cutter of Objects When creating objects from a class, it is instantiated Noun Verb Technique ...
Dataflow Programming
https://medium.com/@olegalexander/how-to-write-large-programs-628c90a70615 Dataflow Programming While modular programming can help you build a single large program, dataflow programming can help you build a large pipeline of many interconnected programs. As ...
Style Guides
Pep8 Google Style Guide https://google.github.io/styleguide/pyguide.html
Refactor
https://www.youtube.com/watch?v=s_4ZrtQs8Do """ Basic video exporting example """ import pathlib from abc import ABC, abstractmethod class VideoExporter(ABC): """Basic representation of video exporting codec.""" @abstractmethod def...