Video summary
Can You Really Learn DSA With Python?
Main summary
Key takeaways
Main ideas / lessons conveyed
- The question “Can you do DSA with Python?” is treated like a “mystery” because people often hear the claim that DSA / competitive programming cannot be done with Python.
- The video distinguishes between:
- Competitive programming (speed-critical, rankings/contests)
- DSA for interviews/companies (logic/solution correctness matters)
- Central conclusion:
- Yes, you can learn and do DSA with Python, especially for interviews and company coding rounds.
- For competitive programming (speed/scale), languages like C++/Java may have an edge due to runtime performance.
Competitive Programming: what it is and why people discourage Python
Platforms for practicing
Examples mentioned:
- CodeChef (“Code Chef”)
- Codeforces (“Code Forces”)
- LeetCode (“Lead Code”)
- HackerRank
Key claim about the “competitive programming environment”
These sites are described as independent platforms for contests/rankings/community—not direct corporate hiring systems.
Speed requirement
Competitive programming emphasizes fast execution.
Compile-time vs. interpreted languages (conceptual explanation)
- Compiled languages: compile the whole program, then run it (generally faster).
- Interpreted languages: run code line-by-line (generally slower).
Why Python is said to be slower in contests
Python is described as interpreted, which can make it slower than C++ in time-sensitive scenarios.
Illustrative example (for understanding the idea):
- A problem with 1 million test cases
- C++: ~0.1 ms
- Python: ~10 ms
- This difference can lead to TL (Time Limit Exceeded) in contests.
Why it matters (practical implication)
- On competitive platforms, performance affects ranking.
- Slower languages can cause you to fall behind.
Competitive programming vs hiring (framing)
The speaker argues competitive sites are mostly about sports/ranking, not direct job outcomes. Instead, large companies are said to run their own contests to identify top talent (examples below).
Big companies / contests mentioned (as “competitive programming” examples)
- Google Code Jam
- Facebook Hacker Cup
Implied takeaway: these competitions reward the fastest submissions, which often favors compiled languages.
“DSA for companies” vs competitive programming (where Python fits)
Types of companies
1) Service-based companies
Examples listed:
- TCS, Capgemini, Wipro, Accenture, Mindtree, Cognizant, Hexaware (and more)
Expectation level and coding-round style (described):
- Not deep DSA required
- Basic arrays/strings
- Simple loops/patterns
- Basic sorting and searching
- Straightforward logic
Python usage: “Python is more than enough” for these rounds. Core message: basic Python + simple logic can work.
2) Product-based companies
Examples listed:
- Amazon, Microsoft, Google, Flipkart, Swiggy, Zomato, Paytm (and more)
Expectation level:
- Stronger DSA expectations
Topics mentioned for coding rounds:
- Arrays, strings, lengths
- Trees, graphs
- Dynamic Programming (DP)
- Recursion
- Backtracking
- Binary search
- Stacks and queues
Python usage: still considered acceptable (“Python still works here, no problem at all”). Core message: solution logic matters more than language choice.
Claim about language choice in interviews
- The speaker asserts many top product companies accept preferred languages, including Python.
- Reasoning: interviewers assess how you solve the problem, not only the language.
Instructional/learning methodology emphasized
The speaker stresses logic-building over relying on built-in functions, partly to counter the “don’t use Python for DSA” narrative.
How to learn DSA with Python (as described)
- Use Python as a tool to learn concepts, not to avoid learning.
- Built-ins can make DSA seem easier—but you should still learn the fundamentals.
- Example contrast:
- If using built-ins:
- Sorting via Python’s
.sort() - Code becomes shorter
- Sorting via Python’s
- If learning core logic (speaker’s approach):
- Teach bubble sort and insertion sort directly
- Explain how they work and why they’re used
- Avoid relying on built-ins so the underlying DSA logic is understood
- If using built-ins:
Interview-specific guidance
Even if online platforms allow built-ins, in face-to-face interviews the interviewer might ask:
- “Can you solve without using
sort?”
Then you should be able to:
- Implement sorting/searching yourself
- Avoid blind dependence on libraries
Goal: demonstrate you understand the concept behind the tool.
Final verdict / recommendations
- Verdict on Python for DSA learning: DSA with Python is absolutely possible.
- What differs between competitive programming and interviews:
- Competitive programming: prioritize execution speed → C++/Java often perform better.
- Interviews/companies: prioritize correct approach and logic → Python is acceptable.
- Language focus hierarchy:
- Logic building is the primary skill
- Language/syntax/built-ins are secondary
- Analogy used: learning balance on a bicycle builds a core skill—you can later ride different bikes. Similarly, learning DSA logic helps you adapt to any language.
- Targeting competitive programming ranking dominance:
- Recommendation: C++ (and other faster compiled languages)
- If already studying Python (especially with a data science background):
- Suggestion: you can transition into DSA effectively using Python.
- Opportunity framing:
- Python can help you apply to more companies than a narrow “C++ only” approach.
Speakers / sources featured
- Akashvas / Akash V (main speaker/host; ends with “I am Akashvas”)
- “Reddit Veddit” (mentioned as a source location for an overview)
- Quora (mentioned as a source location; the speaker references a Quora post/review)