Skip to content

tamim/python-data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Choosing the Right Data Structure in Python

A short tutorial series for Python learners and competitive programming students who know the syntax of lists, sets, and dictionaries, but want stronger instinct about when to use each one.

This is not mainly a guide to more methods.

It is a guide to pausing, naming the real task, and choosing the structure that fits.

Many students write list-based code because lists feel familiar. Sometimes that works well. Sometimes it leads to awkward code, hidden repeated work, and slow solutions that break down on larger inputs.

The central habit of the series is simple:

before writing code, identify the real job first.

For Readers

This series is written for:

  • Python learners
  • middle and secondary school students
  • self-study students preparing for competitive programming
  • readers who already know the basics of lists, sets, and dictionaries, but want stronger problem-solving instinct

The core message running through the tutorials is this:

The problem is not always your code.
Sometimes the real problem is the data structure you chose.

Table of Contents

  1. Tutorial 1: What Lists Are Actually For
  2. Tutorial 2: A List Crime Scene: When Familiar Code Leads to TLE
  3. Tutorial 3: Sets for Membership and Seen-Before Problems
  4. Tutorial 4: Dictionaries for Counting and Lookup
  5. Tutorial 5: defaultdict for Cleaner Patterns
  6. Tutorial 6: Choosing the Right Tool Before You Code

About

A short Python tutorial series on choosing the right data structure for problem solving and competitive programming.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors