Clear all DSA rounds,
By mastering these 20 DSA patterns
1. Fast and Slow Pointer
- Cycle detection method
- O(1) space efficiency
- Linked list problems
2. Merge Intervals
- Sort and merge
- O(n log n) complexity
- Overlapping interval handling
3. Sliding Window
- Fixed/variable window
- O(n) time optimization
- Subarray/substring problems
4. Islands (Matrix Traversal)
- DFS/BFS traversal
- Connected component detection
- 2D grid problems
5. Two Pointers
- Dual pointer strategy
- Linear time complexity
- Array/list problems
6. Cyclic Sort
- Sorting in cycles
- O(n) time complexity
- Constant space usage
7. In-place Reversal of Linked List
- Reverse without extra space
- O(n) time efficiency
- Pointer manipulation technique
8. Breadth First Search
- Level-by-level traversal
- Uses queue structure
- Shortest path problems
9. Depth First Search
- Recursive/backtracking approach
- Uses stack (or recursion)
- Tree/graph traversal
10. Two Heaps
- Max and min heaps
- Median tracking efficiently
- O(log n) insertions
11. Subsets
- Generate all subsets
- Recursive or iterative
- Backtracking or bitmasking
12. Modified Binary Search
- Search in variations
- O(log n) time
- Rotated/specialized arrays
13. Bitwise XOR
- Toggle bits operation
- O(1) space complexity
- Efficient for pairing
14. Top 'K' elements
- Use heap/quickselect
- O(n log k) time
- Efficient selection problem
15. K-way Merge
- Merge sorted lists
- Min-heap based approach
- O(n log k) complexity
16. 0/1 Knapsack (Dynamic Programming)
- Choose or skip items
- O(n * W) complexity
- Maximize value selection
17. Unbounded Knapsack (Dynamic Programming)
- Unlimited item choices
- O(n * W) complexity
- Multiple item selection
18. Topological Sort (Graphs)
- Directed acyclic graph
- Order dependency resolution
- Uses DFS or BFS
19. Monotonic Stack
- Maintain increasing/decreasing stack
- Optimized for range queries
- O(n) time complexity
20. Backtracking
- Recursive decision-making
- Explore all possibilities
- Pruning with constraints
All the best 👍👍
By mastering these 20 DSA patterns
1. Fast and Slow Pointer
- Cycle detection method
- O(1) space efficiency
- Linked list problems
2. Merge Intervals
- Sort and merge
- O(n log n) complexity
- Overlapping interval handling
3. Sliding Window
- Fixed/variable window
- O(n) time optimization
- Subarray/substring problems
4. Islands (Matrix Traversal)
- DFS/BFS traversal
- Connected component detection
- 2D grid problems
5. Two Pointers
- Dual pointer strategy
- Linear time complexity
- Array/list problems
6. Cyclic Sort
- Sorting in cycles
- O(n) time complexity
- Constant space usage
7. In-place Reversal of Linked List
- Reverse without extra space
- O(n) time efficiency
- Pointer manipulation technique
8. Breadth First Search
- Level-by-level traversal
- Uses queue structure
- Shortest path problems
9. Depth First Search
- Recursive/backtracking approach
- Uses stack (or recursion)
- Tree/graph traversal
10. Two Heaps
- Max and min heaps
- Median tracking efficiently
- O(log n) insertions
11. Subsets
- Generate all subsets
- Recursive or iterative
- Backtracking or bitmasking
12. Modified Binary Search
- Search in variations
- O(log n) time
- Rotated/specialized arrays
13. Bitwise XOR
- Toggle bits operation
- O(1) space complexity
- Efficient for pairing
14. Top 'K' elements
- Use heap/quickselect
- O(n log k) time
- Efficient selection problem
15. K-way Merge
- Merge sorted lists
- Min-heap based approach
- O(n log k) complexity
16. 0/1 Knapsack (Dynamic Programming)
- Choose or skip items
- O(n * W) complexity
- Maximize value selection
17. Unbounded Knapsack (Dynamic Programming)
- Unlimited item choices
- O(n * W) complexity
- Multiple item selection
18. Topological Sort (Graphs)
- Directed acyclic graph
- Order dependency resolution
- Uses DFS or BFS
19. Monotonic Stack
- Maintain increasing/decreasing stack
- Optimized for range queries
- O(n) time complexity
20. Backtracking
- Recursive decision-making
- Explore all possibilities
- Pruning with constraints
All the best 👍👍
👍8❤1🔥1
Learn skills from Google, IBM and Meta
1. Google Data Analytics
https://lnkd.in/dh3EfuAb
2. Google Project Management
https://lnkd.in/dABg5Bq2
3. Google IT Support
https://lnkd.in/dTb2xFhs
4. Google Digital Marketing & E-commerce
https://lnkd.in/dR5-TzGZ
5. Google IT Automation with Python
https://lnkd.in/d5mVf7TD
6. Google Business Intelligence
https://lnkd.in/dhf2Rvnx
7. Google Advanced Data Analytics
https://lnkd.in/dh3EfuAb
8. Google Cybersecurity
https://lnkd.in/dUB-QZRP
9. IBM Data Science
https://lnkd.in/dn8enWRk
10. Machine Learning
https://lnkd.in/diR_TFVq
11. IBM Data Analyst
https://lnkd.in/dw2FCJnw
12. Python for Everybody
https://lnkd.in/d8Adh_wB
1. Google Data Analytics
https://lnkd.in/dh3EfuAb
2. Google Project Management
https://lnkd.in/dABg5Bq2
3. Google IT Support
https://lnkd.in/dTb2xFhs
4. Google Digital Marketing & E-commerce
https://lnkd.in/dR5-TzGZ
5. Google IT Automation with Python
https://lnkd.in/d5mVf7TD
6. Google Business Intelligence
https://lnkd.in/dhf2Rvnx
7. Google Advanced Data Analytics
https://lnkd.in/dh3EfuAb
8. Google Cybersecurity
https://lnkd.in/dUB-QZRP
9. IBM Data Science
https://lnkd.in/dn8enWRk
10. Machine Learning
https://lnkd.in/diR_TFVq
11. IBM Data Analyst
https://lnkd.in/dw2FCJnw
12. Python for Everybody
https://lnkd.in/d8Adh_wB
lnkd.in
LinkedIn
This link will take you to a page that’s not on LinkedIn
👍4🖕2❤1🔥1
Complete Roadmap map To learn SQL in one month
Week 1: Introduction and Basics
Day 1-2: Understanding Databases and SQL Syntax
•Study relational databases and SQL’s role in managing and querying data.
•Familiarize yourself with common SQL databases (e.g., MySQL, PostgreSQL, SQLite).
•Install a SQL environment or use a cloud-based platform like SQLBolt, Mode, or Google BigQuery to practice.
•Day 3-4: Basic SQL Commands
•Learn fundamental commands such as SELECT, FROM, and WHERE.
•Practice filtering data with conditions and combining them with AND, OR, and NOT operators.
•Complete exercises on selecting specific columns, using DISTINCT to remove duplicates, and sorting data with ORDER BY.
•Day 5-7: Basic Functions and Aggregate Functions
•Learn to use basic functions like COUNT, SUM, MIN, MAX, and AVG for aggregate data analysis.
•Practice grouping data with GROUP BY and filtering grouped data with HAVING.
Week 2: Intermediate Querying Techniques
•Day 8-10: Joining Tables
•Study types of joins (INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN).
•Understand primary and foreign keys and how they link tables in relational databases.
•Practice combining data from multiple tables with various joins.
• Day 11-12: Subqueries and Nested Queries
• Learn how to create subqueries within SELECT, WHERE, and FROM clauses.
• Practice writing queries that depend on other queries, focusing on readability and efficiency.
• Day 13-14: Set Operations
• Learn about set operators (UNION, INTERSECT, EXCEPT) to combine or filter query results.
• Practice combining results from different tables or queries and filtering results.
Week 3: Advanced SQL Concepts
• Day 15-16: Advanced Functions
• Study string functions (e.g., CONCAT, SUBSTRING, REPLACE), date functions (e.g., DATEADD, DATEDIFF), and mathematical functions.
• Learn about case statements and conditional logic to customize output.
• Day 17-18: Indexes and Performance Optimization
• Understand indexes, their purpose, and their effect on query performance.
• Study how to use EXPLAIN to analyze queries and optimize them for faster results.
• Day 19-21: Stored Procedures, Triggers, and Views
• Learn to create stored procedures to encapsulate SQL code for reusability.
• Study triggers to automate actions based on database events.
• Practice creating views to simplify complex queries for easier access.
Week 4: Final Project and Practical Applications
• Day 22-25: Case Study or Mini Project
• Choose a dataset (e.g., a sample sales database) and outline analysis goals.
• Write queries to extract insights, applying techniques from previous weeks.
• Ensure to include complex joins, subqueries, and aggregate analysis.
• Day 26-28: Error Handling and Best Practices
• Learn common SQL pitfalls and best practices for writing clean, efficient queries.
• Understand how to troubleshoot errors and optimize query structure.
• Day 29-30: Review and Practice
• Revisit complex topics and practice additional exercises.
• Take sample SQL assessments or timed quizzes to evaluate your progress.
By following this roadmap, you will build a solid SQL foundation within a month.
Week 1: Introduction and Basics
Day 1-2: Understanding Databases and SQL Syntax
•Study relational databases and SQL’s role in managing and querying data.
•Familiarize yourself with common SQL databases (e.g., MySQL, PostgreSQL, SQLite).
•Install a SQL environment or use a cloud-based platform like SQLBolt, Mode, or Google BigQuery to practice.
•Day 3-4: Basic SQL Commands
•Learn fundamental commands such as SELECT, FROM, and WHERE.
•Practice filtering data with conditions and combining them with AND, OR, and NOT operators.
•Complete exercises on selecting specific columns, using DISTINCT to remove duplicates, and sorting data with ORDER BY.
•Day 5-7: Basic Functions and Aggregate Functions
•Learn to use basic functions like COUNT, SUM, MIN, MAX, and AVG for aggregate data analysis.
•Practice grouping data with GROUP BY and filtering grouped data with HAVING.
Week 2: Intermediate Querying Techniques
•Day 8-10: Joining Tables
•Study types of joins (INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN).
•Understand primary and foreign keys and how they link tables in relational databases.
•Practice combining data from multiple tables with various joins.
• Day 11-12: Subqueries and Nested Queries
• Learn how to create subqueries within SELECT, WHERE, and FROM clauses.
• Practice writing queries that depend on other queries, focusing on readability and efficiency.
• Day 13-14: Set Operations
• Learn about set operators (UNION, INTERSECT, EXCEPT) to combine or filter query results.
• Practice combining results from different tables or queries and filtering results.
Week 3: Advanced SQL Concepts
• Day 15-16: Advanced Functions
• Study string functions (e.g., CONCAT, SUBSTRING, REPLACE), date functions (e.g., DATEADD, DATEDIFF), and mathematical functions.
• Learn about case statements and conditional logic to customize output.
• Day 17-18: Indexes and Performance Optimization
• Understand indexes, their purpose, and their effect on query performance.
• Study how to use EXPLAIN to analyze queries and optimize them for faster results.
• Day 19-21: Stored Procedures, Triggers, and Views
• Learn to create stored procedures to encapsulate SQL code for reusability.
• Study triggers to automate actions based on database events.
• Practice creating views to simplify complex queries for easier access.
Week 4: Final Project and Practical Applications
• Day 22-25: Case Study or Mini Project
• Choose a dataset (e.g., a sample sales database) and outline analysis goals.
• Write queries to extract insights, applying techniques from previous weeks.
• Ensure to include complex joins, subqueries, and aggregate analysis.
• Day 26-28: Error Handling and Best Practices
• Learn common SQL pitfalls and best practices for writing clean, efficient queries.
• Understand how to troubleshoot errors and optimize query structure.
• Day 29-30: Review and Practice
• Revisit complex topics and practice additional exercises.
• Take sample SQL assessments or timed quizzes to evaluate your progress.
By following this roadmap, you will build a solid SQL foundation within a month.
👍9❤5
❯ Python
cs50.harvard.edu/python/
❯ JavaScript
openclassrooms.com/en/courses/566…
❯ SQL
online.stanford.edu/courses/soe-yd…
❯ C
alison.com/course/diploma…
❯ C++
alison.com/course/c-plus-…
❯ Java
scaler.com/topics/course/…
❯ C#
freecodecamp.org/learn/foundati…
❯ HTML and CSS
openclassrooms.com/en/courses/526…
❯ React
v2.scrimba.com/learn-react-c0e
cs50.harvard.edu/python/
❯ JavaScript
openclassrooms.com/en/courses/566…
❯ SQL
online.stanford.edu/courses/soe-yd…
❯ C
alison.com/course/diploma…
❯ C++
alison.com/course/c-plus-…
❯ Java
scaler.com/topics/course/…
❯ C#
freecodecamp.org/learn/foundati…
❯ HTML and CSS
openclassrooms.com/en/courses/526…
❯ React
v2.scrimba.com/learn-react-c0e
cs50.harvard.edu
CS50's Introduction to Programming with Python
An introduction to programming using a language called Python. Learn how to read and write code as well as how to test and “debug” it. Designed for students...
❤5👍4
Here is the code to make a Pac-Man game 👇🏼
- Install Pygame if you don’t have it already:
Python Code for a Basic Pac-Man Game:
- Install Pygame if you don’t have it already:
pip install pygamePython Code for a Basic Pac-Man Game:
import pygame
import sys
# Initialize Pygame
pygame.init()
# Screen settings
WIDTH, HEIGHT = 600, 400
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Pac-Man Game")
# Colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
YELLOW = (255, 255, 0)
RED = (255, 0, 0)
# Clock for frame rate
clock = pygame.time.Clock()
FPS = 30
# Pac-Man settings
pacman_size = 20
pacman_x, pacman_y = WIDTH // 2, HEIGHT // 2
pacman_speed = 5
pacman_dir = "RIGHT"
# Ghost settings
ghost_size = 20
ghost_x, ghost_y = 100, 100
ghost_speed = 2
# Collectibles (dots)
dots = [(50, 50), (150, 100), (300, 200), (400, 300), (500, 150)]
dot_radius = 5
# Score
score = 0
# Game loop
running = True
while running:
screen.fill(BLACK)
# Handle events
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Move Pac-Man
keys = pygame.key.get_pressed()
if keys[pygame.K_UP]:
pacman_y -= pacman_speed
pacman_dir = "UP"
if keys[pygame.K_DOWN]:
pacman_y += pacman_speed
pacman_dir = "DOWN"
if keys[pygame.K_LEFT]:
pacman_x -= pacman_speed
pacman_dir = "LEFT"
if keys[pygame.K_RIGHT]:
pacman_x += pacman_speed
pacman_dir = "RIGHT"
# Keep Pac-Man on screen
pacman_x = max(0, min(WIDTH - pacman_size, pacman_x))
pacman_y = max(0, min(HEIGHT - pacman_size, pacman_y))
# Draw Pac-Man
if pacman_dir == "RIGHT":
pygame.draw.pacman = pygame.draw.polygon(screen, YELLOW, [(pacman_x + pacman_size, pacman_y + pacman_size )👍17❤5🥰3
❤2
Wish you a very Happy New Year! 🎉 May this year bring you success, happiness, and endless opportunities to shine
❤4🎉3
import os
import subprocess
def get_connected_devices():
"""
Fetch a list of devices connected to your Wi-Fi network using ARP.
"""
try:
print("Fetching connected devices...")
devices = subprocess.check_output("arp -a", shell=True).decode()
print("Connected Devices:\n", devices)
except Exception as e:
print("Error fetching connected devices:", e)
def change_wifi_password(ssid, new_password):
"""
Update the Wi-Fi password on the router using the router's admin panel.
"""
print(f"Make sure to log in to your router's admin panel to change the password for Wi-Fi network: {ssid}")
print(f"Set the new password to: {new_password}")
def block_device(mac_address):
"""
Block a specific device from your network using its MAC address.
"""
try:
print(f"Blocking device with MAC address: {mac_address}...")
command = f"netsh wlan block allowmac={mac_address}"
os.system(command)
print(f"Device {mac_address} has been blocked.")
except Exception as e:
print("Error blocking device:", e)
def secure_wifi():
"""
Perform basic Wi-Fi security tasks.
"""
print("Securing your Wi-Fi network...\n")
# Step 1: Get a list of connected devices
get_connected_devices()
# Step 2: Change Wi-Fi password
ssid = input("\nEnter your Wi-Fi SSID: ")
new_password = input("Enter a new strong password for your Wi-Fi: ")
change_wifi_password(ssid, new_password)
# Step 3: Block suspicious devices
block_option = input("\nDo you want to block a suspicious device? (yes/no): ").strip().lower()
if block_option == "yes":
mac_address = input("Enter the MAC address of the device to block: ").strip()
block_device(mac_address)
print("\nWi-Fi security measures applied. Ensure your router settings are up-to-date!")
# Run the Wi-Fi security tool
secure_wifi()
import subprocess
def get_connected_devices():
"""
Fetch a list of devices connected to your Wi-Fi network using ARP.
"""
try:
print("Fetching connected devices...")
devices = subprocess.check_output("arp -a", shell=True).decode()
print("Connected Devices:\n", devices)
except Exception as e:
print("Error fetching connected devices:", e)
def change_wifi_password(ssid, new_password):
"""
Update the Wi-Fi password on the router using the router's admin panel.
"""
print(f"Make sure to log in to your router's admin panel to change the password for Wi-Fi network: {ssid}")
print(f"Set the new password to: {new_password}")
def block_device(mac_address):
"""
Block a specific device from your network using its MAC address.
"""
try:
print(f"Blocking device with MAC address: {mac_address}...")
command = f"netsh wlan block allowmac={mac_address}"
os.system(command)
print(f"Device {mac_address} has been blocked.")
except Exception as e:
print("Error blocking device:", e)
def secure_wifi():
"""
Perform basic Wi-Fi security tasks.
"""
print("Securing your Wi-Fi network...\n")
# Step 1: Get a list of connected devices
get_connected_devices()
# Step 2: Change Wi-Fi password
ssid = input("\nEnter your Wi-Fi SSID: ")
new_password = input("Enter a new strong password for your Wi-Fi: ")
change_wifi_password(ssid, new_password)
# Step 3: Block suspicious devices
block_option = input("\nDo you want to block a suspicious device? (yes/no): ").strip().lower()
if block_option == "yes":
mac_address = input("Enter the MAC address of the device to block: ").strip()
block_device(mac_address)
print("\nWi-Fi security measures applied. Ensure your router settings are up-to-date!")
# Run the Wi-Fi security tool
secure_wifi()
👍6
Top 5 In-Demand Skills for Students in 2025 🎯
1️⃣ Cybersecurity
🔗 https://youtu.be/v3iUx2SNspY?si=hPksJY9ycgqQwwU1
2️⃣ Data Analytics
🔗 https://youtu.be/VaSjiJMrq24?si=fdhjQCebSQp7EW7i
3️⃣ Data Science
🔗 https://youtu.be/gDZ6czwuQ18?si=lhak4XJzOTa2diBo
4️⃣ Generative AI
🔗 https://youtu.be/mEsleV16qdo?si=WFucxrox6ELNCZPZ
5️⃣ Machine Learning
🔗 https://youtu.be/LvC68w9JS4Y?si=DAJFSG-ZF6oFn-B
1️⃣ Cybersecurity
🔗 https://youtu.be/v3iUx2SNspY?si=hPksJY9ycgqQwwU1
2️⃣ Data Analytics
🔗 https://youtu.be/VaSjiJMrq24?si=fdhjQCebSQp7EW7i
3️⃣ Data Science
🔗 https://youtu.be/gDZ6czwuQ18?si=lhak4XJzOTa2diBo
4️⃣ Generative AI
🔗 https://youtu.be/mEsleV16qdo?si=WFucxrox6ELNCZPZ
5️⃣ Machine Learning
🔗 https://youtu.be/LvC68w9JS4Y?si=DAJFSG-ZF6oFn-B
YouTube
Cyber Security Full Course for Beginners in 11 Hours - 2025 Edition
Cyber Security Full Course for Beginners in 11 Hours - 2025 Edition
🔴 To learn Ethical Hacking Course online with regular LIVE CLASSES, enroll now: https://www.wscubetech.com/landing-pages/online-ethical-hacking-course.html?utm_source=YouTube&utm_medium…
🔴 To learn Ethical Hacking Course online with regular LIVE CLASSES, enroll now: https://www.wscubetech.com/landing-pages/online-ethical-hacking-course.html?utm_source=YouTube&utm_medium…
👍3