Welcome to the Algorithms and Data Structures 101 repository! This repository contains course materials designed for beginners, especially those new to computer science and programming. Whether you're a fresher from a non-CS background or simply looking to strengthen your problem-solving skills, this course will help you build a strong foundation in both algorithms and data structures.
Note: Innovative Skills sponsors this course for their Job Placement Community. For more information, visit Innovative Skills. Additionally, I conduct two live classes a month exclusively for the community, providing an interactive learning experience and real-time problem-solving.
- Introduction
- Course Outline
- LeetCode Practice
- Live Classes
- Resources
- How to Use This Repository
- Contributing
- Repository & Collaboration
- License
This course is structured to provide a gradual introduction to algorithms and data structures, starting from basic programming concepts and moving towards more complex topics such as trees, graphs, and dynamic programming. Each module contains lecture notes, code examples, practice problems, and additional resources to help you master the subject.
- Course overview, goals, and expectations
- What is Programming and Why Learn It?
- Introduction to Algorithm and Data Structure
- Real-life examples of algorithms
- Introduction to Programming Languages
- Introduction to Online Judge [LeetCode]
- Pseudocode and Flowchart
- Importance of Problem-Solving Skills
- Setting up the environment (IDEs like VS Code, PyCharm)
- Variables, Data Types
- Operators
- Input and Output
- Conditional Statements
- Loops
- Break and Continue
- Functions
- What is a String?
- String Representation
- Basic String Operations
- Common String Methods
- String Manipulation Algorithms
- Advanced String Topics [Regex, Compression, Permutations]
- Reverse a String:
Write a function to reverse a given string.
Example: "hello" → "olleh" - Check if a String is a Palindrome:
Determine whether a string reads the same backward as forward.
Example: "madam" → True, "hello" → False - Count Vowels and Consonants:
Count the number of vowels and consonants in a string.
Example: "Hello World" → Vowels: 3, Consonants: 7 - Remove Duplicates from a String:
Remove all duplicate characters from a string while maintaining the order.
Example: "hello" → "helo" - Find the Most Frequent Character:
Find the character that appears most frequently in a string.
Example: "hello" → 'l'
- Anagram Check:
Determine if two strings are anagrams (contain the same characters in different orders).
Example: "listen" and "silent" → True - Longest Palindromic Substring:
Find the longest substring that is a palindrome.
Example: "babad" → "bab" or "aba" - String Compression:
Compress a string by counting consecutive characters.
Example: "aaabbbcc" → "a3b3c2" - Valid Parentheses:
Check if a string containing parentheses (), {}, and [] is valid.
Example: "[{()}]" → True, "[{(})]" → False - Reverse Words in a Sentence:
Reverse the order of words in a sentence.
Example: "Hello World" → "World Hello"
- Longest Common Prefix:
Find the longest common prefix among a list of strings.
Example: ["flower", "flow", "flight"] → "fl" - Implement strstr() or indexOf():
Implement a function to find the first occurrence of a substring in a string.
Example: ("hello world", "world") → 6 - Minimum Window Substring:
Given two strings s and t, find the minimum window in s that contains all characters of t.
Example: ("ADOBECODEBANC", "ABC") → "BANC" - Regular Expression Matching:
Implement a function to match a string against a pattern with.
(matches any single character) and*
(matches zero or more of the preceding element).
Example: ("aab", "cab") → True - Group Anagrams:
Group a list of strings into groups of anagrams.
Example: ["eat", "tea", "tan", "ate", "nat", "bat"] → [["eat", "tea", "ate"], ["tan", "nat"], ["bat"]]
- Edit Distance (Levenshtein Distance):
Find the minimum number of operations (insert, delete, replace) required to convert one string to another.
Example: ("horse", "ros") → 3 - Word Break Problem:
Determine if a string can be segmented into space-separated words from a dictionary.
Example: ("leetcode", ["leet", "code"]) → True - Text Justification:
Align a block of text so that each line has exactly L characters, fully justified.
Example: (["This", "is", "an", "example"], L = 16) → "This is an example" - Wildcard Matching:
Match a string against a pattern with?
(matches any single character) and*
(matches any sequence of characters).
Example: ("adceb", "ab") → True - Serialize and Deserialize a String:
Serialize a string into a compact format and deserialize it back.
Example: "Hello World" → Serialized: "5#Hello5#World", Deserialized: "Hello World"
- Understand Big-O Notation (upper bound)
- Understand Big-Theta Notation (tight bound)
- Understand Big-Omega Notation (lower bound)
- Analyze sample algorithms to determine time complexity
- Analyze sample algorithms to determine space complexity
- Use LeetCode to sharpen your algorithm and data structure skills while preparing for technical interviews.
- Establish a regular schedule, maintain a problem-solving log, and participate in contests to simulate real-world challenges.
As part of the course, I conduct two live classes a month for the Innovative Skills Job Placement Community. These sessions are designed to:
- Enhance Understanding: Deep-dive into complex topics.
- Interactive Learning: Engage with instructors through Q&A sessions.
- Practical Application: Solve real-world coding problems live.
Keep an eye on the repository or the community announcements for the schedule and links to the live sessions.
- Lecture Slides & Notes: Detailed lecture notes are available in the
lectures/
folder. - Code Examples: Sample code and demos can be found in the
code/
directory. - Practice Problems: Exercise sets and challenges are provided in the
exercises/
folder. - Supplementary Materials: Additional reading materials, articles, and videos are linked in the
resources/
folder.
- Follow the Course Outline: Each folder is structured to match a specific module or topic. Start with the introductory materials and progress through the topics.
- Practice Coding: Review the example codes and try to implement the algorithms and data structures on your own.
- Engage in Live Sessions: Join the live classes to get real-time help and enhance your understanding of the topics.
- Contribute: Feel free to fork the repository, provide improvements, or share your solutions to the exercises.
- Stay Connected: Use the Issues section to ask questions, share feedback, or report bugs.
Contributions are welcome! If you have suggestions or improvements, please open an issue or submit a pull request. For major changes, please discuss them in an issue first to ensure smooth collaboration.
- Organize repository folders (e.g.,
lectures/
,code/
,exercises/
,resources/
) - Set up an issue tracker for questions and feedback
- Create contribution guidelines for community involvement (see
CONTRIBUTING.md
) - Update the README with any changes or new resources
This project is licensed under the MIT License - see the LICENSE file for details.
Happy learning and coding! If you have any questions or feedback, feel free to reach out.