ProjectWithSourceCodes
1.03K subscribers
332 photos
8 videos
53 files
1.37K links
Free Source Code Projects for Students 🚀 | Python | Java | Android | Web Dev | AI/ML | Final Year Projects | BCA • BTech • MCA | Interview Prep | Job Alerts

Website: https://updategadh.com
Download Telegram
🚀 Advanced Coding Interview Questions with Answers (Part 1)

1️⃣ Find the Longest Substring Without Repeating Characters

👉 Given a string, find the length of the longest substring containing no duplicate characters.

def longest_unique_substring(s):
seen = set()
left = 0
max_length = 0

for right in range(len(s)):
while s[right] in seen:
seen.remove(s[left])
left += 1

seen.add(s[right])
max_length = max(max_length, right - left + 1)

return max_length

print(longest_unique_substring("abcabcbb"))


📌 Output:

3


⏱ Time Complexity: O(n)
💾 Space Complexity: O(n)

---

2️⃣ Find the Kth Largest Element in an Array

👉 Find the Kth largest element without completely sorting the array.

import heapq

def kth_largest(nums, k):
heap = nums[:k]
heapq.heapify(heap)

for num in nums[k:]:
if num > heap[0]:
heapq.heapreplace(heap, num)

return heap[0]

print(kth_largest([3, 2, 1, 5, 6, 4], 2))


📌 Output:

5


⏱ Time Complexity: O(n log k)
💾 Space Complexity: O(k)

---

3️⃣ Detect a Cycle in a Linked List

👉 Determine whether a linked list contains a cycle using Floyd's Cycle Detection Algorithm.

def has_cycle(head):
slow = head
fast = head

while fast and fast.next:
slow = slow.next
fast = fast.next.next

if slow == fast:
return True

return False


💡 The slow pointer moves one step while the fast pointer moves two steps.

⏱ Time Complexity: O(n)
💾 Space Complexity: O(1)

---

4️⃣ Find the Maximum Subarray Sum

👉 Find the contiguous subarray with the largest sum using Kadane's Algorithm.

def max_subarray_sum(nums):
current = nums[0]
maximum = nums[0]

for num in nums[1:]:
current = max(num, current + num)
maximum = max(maximum, current)

return maximum

print(max_subarray_sum([-2, 1, -3, 4, -1, 2, 1, -5, 4]))


📌 Output:

6


⏱ Time Complexity: O(n)
💾 Space Complexity: O(1)

---

5️⃣ Merge Overlapping Intervals

👉 Given a collection of intervals, merge all overlapping intervals.

def merge_intervals(intervals):
intervals.sort(key=lambda x: x[0])
merged = []

for start, end in intervals:
if not merged or start > merged[-1][1]:
merged.append([start, end])
else:
merged[-1][1] = max(merged[-1][1], end)

return merged

print(merge_intervals([[1, 3], [2, 6], [8, 10], [9, 12]]))


📌 Output:

[[1, 6], [8, 12]]


⏱ Time Complexity: O(n log n)
💾 Space Complexity: O(n)

---

💬 Save this for your advanced coding interview preparation!

🔥 Part 2 will cover 5 harder problems on Binary Search, Dynamic Programming, Graphs, Backtracking & Sliding Window.

#Coding #CodingInterview #Python #DSA #AdvancedCoding #Algorithms #DynamicProgramming #Graphs #Programming #TechInterview
🚀 AI Powered Resume Screening System Using Python

An advanced AI-based project that automates resume screening, analyzes candidate skills, matches resumes with job descriptions, and helps rank suitable candidates.

🔥 Key Features:
• Resume Upload & Parsing
• NLP-Based Resume Analysis
• Skills Matching
• TF-IDF & Cosine Similarity
• Candidate Ranking
• Matched & Missing Skills
• OCR for Scanned Resumes
• Job Description Matching
• Candidate Profiles
• CSV & PDF Reports
• Role-Based Authentication

💻 Technologies Used:
Python | Streamlit | SQLite | NLP | Scikit-learn | OpenCV | Tesseract OCR



👉 Complete Project Details:
https://updategadh.com/ai-powered-resume-screening/



#Python #AI #MachineLearning #NLP #AIProject #PythonProject #FinalYearProject #ResumeScreening
🧠 Oral Cancer Detection Using Deep Learning – Python Project

Looking for an interesting AI & Deep Learning project for your final year or college project? 🚀

Oral Cancer Detection Using Deep Learning is a healthcare-focused machine learning project that explores how deep learning can be used for image-based oral cancer detection.

🔍 Project Highlights:
• Deep Learning based approach
• Image classification concept
• Healthcare + Artificial Intelligence
• Python-based project
• Useful for AI/ML & Deep Learning students
• Suitable for college & final-year project learning

💻 Project: Oral Cancer Detection Using Deep Learning

📚 Explore the complete project & details:
👉 https://updategadh.com/oral-cancer-detection-using-deep-learning/

⚠️ *This is an educational AI/Deep Learning project and should not be considered a medical diagnostic tool.*

🔥 Follow @ProjectWithSourceCodes for more:
✅ Python Projects
✅ AI & ML Projects
✅ Final Year Projects
✅ College Project Ideas
✅ Source Code & Tutorials

#PythonProject #DeepLearning #AIProject #MachineLearning #OralCancerDetection #FinalYearProject #CollegeProject #ArtificialIntelligence #Python #DeepLearningProject
🚀 Advanced Coding Interview Questions with Answers (Part 3)
1️⃣1️⃣ Find the Top K Frequent Elements
👉 Given an array, return the k elements that appear most frequently.
from collections import Counter

def top_k_frequent(nums, k):
frequency = Counter(nums)
return [num for num, count in frequency.most_common(k)]

print(top_k_frequent([1, 1, 1, 2, 2, 3], 2))

📌 Output:
[1, 2]

⏱️ Time Complexity: O(n log n)
💾 Space Complexity: O(n)
1️⃣2️⃣ Generate All Permutations of a String
👉 Generate every possible arrangement of the characters in a string using Backtracking.
def permutations(s):
result = []

def backtrack(path, remaining):
if not remaining:
result.append("".join(path))
return

for i in range(len(remaining)):
backtrack(
path + [remaining[i]],
remaining[:i] + remaining[i + 1:]
)

backtrack([], s)
return result

print(permutations("ABC"))

📌 Output:
['ABC', 'ACB', 'BAC', 'BCA', 'CAB', 'CBA']

⏱️ Time Complexity: O(n × n!)
💾 Space Complexity: O(n × n!)
1️⃣3️⃣ Find the Minimum Coins for a Given Amount
👉 Given coin denominations, find the minimum number of coins required to make a target amount.
def min_coins(coins, amount):
dp = [float("inf")] * (amount + 1)
dp[0] = 0

for current in range(1, amount + 1):
for coin in coins:
if coin <= current:
dp[current] = min(
dp[current],
dp[current - coin] + 1
)

return dp[amount] if dp[amount] != float("inf") else -1

print(min_coins([1, 2, 5], 11))

📌 Output:
3

💡 5 + 5 + 1 = 11
⏱️ Time Complexity: O(amount × number of coins)
💾 Space Complexity: O(amount)
1️⃣4️⃣ Find the Maximum Product Subarray
👉 Find the contiguous subarray whose elements have the largest product.
def max_product_subarray(nums):
current_max = nums[0]
current_min = nums[0]
result = nums[0]

for num in nums[1:]:
if num < 0:
current_max, current_min = current_min, current_max

current_max = max(num, current_max * num)
current_min = min(num, current_min * num)

result = max(result, current_max)

return result

print(max_product_subarray([2, 3, -2, 4]))

📌 Output:
6

💡 The maximum product comes from [2, 3].
⏱️ Time Complexity: O(n)
💾 Space Complexity: O(1)
1️⃣5️⃣ Implement an LRU Cache
👉 An LRU (Least Recently Used) Cache removes the item that has not been accessed for the longest time when the cache reaches its capacity.
from collections import OrderedDict

class LRUCache:
def __init__(self, capacity):
self.capacity = capacity
self.cache = OrderedDict()

def get(self, key):
if key not in self.cache:
return -1

self.cache.move_to_end(key)
return self.cache[key]

def put(self, key, value):
if key in self.cache:
self.cache.move_to_end(key)

self.cache[key] = value

if len(self.cache) > self.capacity:
self.cache.popitem(last=False)

📌 Example:
cache = LRUCache(2)

cache.put(1, "A")
cache.put(2, "B")

print(cache.get(1))

cache.put(3, "C")

print(cache.get(2))

📌 Output:
A
-1

⏱️ Average Time Complexity: O(1) for get() and put()
💾 Space Complexity: O(capacity)
💬 Save this for your advanced coding interview preparation!
🔥 Part 4 will cover 5 advanced problems on Dijkstra's Algorithm, Trie, Union-Find, Matrix & Dynamic Programming.
#Coding #CodingInterview #Python #DSA #AdvancedCoding #Algorithms #DynamicProgramming #Graph #DataStructures #Programming
🤖 How to Build an AI Agent with Python?
Want to build your own AI Agent using Python? 🐍🔥
Learn how AI agents can understand tasks, make decisions, use tools, and automate workflows.

📌 In this guide, learn:
🔹 What is an AI Agent?
🔹 How AI agents work
🔹 Python setup and requirements
🔹 Step-by-step AI Agent development
🔹 How to make your agent perform tasks
🔹 Practical implementation with Python

🚀 Read the Complete Tutorial:
How to Build an AI Agent with Python

📢 Join: @ProjectWithSourceCodes
🌐 UPDATEGADH

#AI #AIAgent #Python #ArtificialIntelligence #PythonProjects #MachineLearning #AITutorial #Coding #Programming #UpdateGadh
🚀 How to Build a Multi-Agent AI System with Python

Want to learn how multiple AI agents can work together to solve complex tasks? 🤖
In this tutorial, learn how to build a Multi-Agent AI System with Python using specialized agents such as:

🔹 Research Agent
🔹 Analysis Agent
🔹 Writing Agent
🔹 Review Agent
🔹 Manager Agent

📌 What You’ll Learn:

✅ What is a Multi-Agent AI System?
✅ How AI agents communicate and collaborate
✅ How to create specialized agents with Python
✅ How to use shared state
✅ How to connect agents using LangGraph
✅ How to build a manager-based AI architecture
✅ Practical applications of Multi-Agent AI

🎓 Perfect for AI students, Python developers, and final-year project learners.
🔗 Read the Complete Tutorial:

https://updategadh.com/how-to-build-a-multi-agent-ai-system-with-python/

📢 Join Telegram: @ProjectWithSourceCodes

#AI #ArtificialIntelligence #MultiAgentAI #AIAgents #Python #PythonAI #LangGraph #GenerativeAI #AIProjects #MachineLearning #PythonProjects #AIDevelopment
🚀 How to Run AI Models Locally with Python Using Ollama

Want to run AI models directly on your own computer? 🤖💻
In this beginner-friendly tutorial, learn how to use Ollama + Python to run local AI models and build your own AI applications.

🔥 What You'll Learn:
✅ Install Ollama
✅ Download and run an AI model
✅ Connect Ollama with Python
✅ Use "chat()" and "generate()"
✅ Build a Python AI chatbot
✅ Maintain conversation history
✅ Stream AI responses
✅ Explore local AI project ideas

💡 Perfect for Python developers, AI learners, and students who want to experiment with Local LLMs.

📖 Read the Complete Tutorial:
👉 https://updategadh.com/run-ai-models-locally-with-python/

🔔 Join for More Projects & Tutorials:
👉 @ProjectWithSourceCode

#Ollama #Python #AI #ArtificialIntelligence #LocalAI #LLM #PythonAI #GenerativeAI #AIChatbot #MachineLearning #PythonTutorial #AITutorial #LocalLLM #AIProjects
🚀 Advanced Coding Interview Questions with Answers (Part 4)
1️⃣6️⃣ Find the Shortest Path Using Dijkstra's Algorithm
👉 Dijkstra's Algorithm finds the shortest path from a source node to other nodes in a graph with non-negative edge weights.
import heapq

def dijkstra(graph, start):
distances = {node: float("inf") for node in graph}
distances[start] = 0

heap = [(0, start)]

while heap:
distance, node = heapq.heappop(heap)

if distance > distances[node]:
continue

for neighbor, weight in graph[node]:
new_distance = distance + weight

if new_distance < distances[neighbor]:
distances[neighbor] = new_distance
heapq.heappush(heap, (new_distance, neighbor))

return distances

⏱️ Time Complexity: O((V + E) log V)
1️⃣7️⃣ Implement a Trie
👉 A Trie is a tree-based data structure commonly used for prefix searching and autocomplete.
class TrieNode:
def __init__(self):
self.children = {}
self.is_end = False


class Trie:
def __init__(self):
self.root = TrieNode()

def insert(self, word):
node = self.root

for char in word:
if char not in node.children:
node.children[char] = TrieNode()

node = node.children[char]

node.is_end = True

def search(self, word):
node = self.root

for char in word:
if char not in node.children:
return False
node = node.children[char]

return node.is_end

⏱️ Time Complexity: O(L) per operation
L = length of the word
1️⃣8️⃣ Find Connected Components Using Union-Find
👉 Union-Find, also called Disjoint Set Union (DSU), efficiently manages groups of connected elements.
class DSU:
def __init__(self, n):
self.parent = list(range(n))

def find(self, x):
if self.parent[x] != x:
self.parent[x] = self.find(self.parent[x])
return self.parent[x]

def union(self, a, b):
root_a = self.find(a)
root_b = self.find(b)

if root_a != root_b:
self.parent[root_b] = root_a

💡 It is commonly used in graph connectivity and Kruskal's algorithm.
⏱️ Amortized Time: Nearly O(1) per operation with path compression and union by rank/size.
1️⃣9️⃣ Rotate a Matrix 90 Degrees Clockwise
👉 Rotate an n × n matrix 90 degrees clockwise in place.
def rotate(matrix):
n = len(matrix)

for i in range(n):
for j in range(i + 1, n):
matrix[i][j], matrix[j][i] = (
matrix[j][i],
matrix[i][j]
)

for row in matrix:
row.reverse()

return matrix

matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]

print(rotate(matrix))

📌 Output:
[[7, 4, 1],
[8, 5, 2],
[9, 6, 3]]

⏱️ Time Complexity: O(n²)
💾 Space Complexity: O(1)
2️⃣0️⃣ Solve the 0/1 Knapsack Problem
👉 Given items with weights and values, find the maximum value that can be placed in a bag with limited capacity.
def knapsack(weights, values, capacity):
dp = [0] * (capacity + 1)

for i in range(len(weights)):
for w in range(capacity, weights[i] - 1, -1):
dp[w] = max(
dp[w],
dp[w - weights[i]] + values[i]
)

return dp[capacity]

print(knapsack([1, 3, 4], [15, 50, 60], 4))

📌 Output:
65

⏱️ Time Complexity: O(n × capacity)
💾 Space Complexity: O(capacity)
💬 Save this for your advanced coding interview preparation!
🔥 Next: Generative AI – Part 9
#Coding #DSA #Python #AdvancedCoding #Algorithms #DynamicProgramming #Graphs #InterviewQuestions
🐍 Python Course Roadmap

Want to learn Python from Beginner to Advanced? 🚀

📌 Complete Python roadmap
💻 Topics to learn step-by-step
🤖 AI & ML direction
🎯 Skills for real projects

📖 Read the Full Roadmap 👇
https://updategadh.com/python-course-roadmap/

🔔 @ProjectWithSourceCodes

#Python #PythonRoadmap #LearnPython #PythonProgramming #AI #MachineLearning #Coding #Programming #PythonCourse
🚀 Insurance Management System with AI – Django Project

Looking for a Python Django project with AI features? Check out this complete Insurance Management System with AI built with Django. 🛡🤖

### 🔥 Key Features

✅ Customer & Admin Panels
✅ Insurance Policy Management
✅ AI Policy Recommendations
✅ AI Premium Estimation
✅ AI Risk Profiling
✅ AI Claim Fraud Screening
✅ Insurance Claim Management
✅ Premium Payment with Razorpay
✅ Payment History & Receipts
✅ AI Support Assistant
✅ Customer Segmentation
✅ Support & Question Management
✅ SQLite Database

💻 Technologies:
🐍 Python | Django | SQLite | AI/ML | JavaScript | Razorpay

🎓 Useful For:
BCA / MCA Students • College Projects • Final Year Projects • Python Django Learners

📖 Complete Project Details & Source Code:
https://updategadh.com/insurance-management-system-with-ai/

📢 More Student Projects: @ProjectWithSourceCode

#Python #Django #AI #MachineLearning #InsuranceManagementSystem #DjangoProject #PythonProject #CollegeProject #BCAProject #MCAProject
🚀 Product Recommendation Systems 🤖🛒

Ever wondered how Amazon, Flipkart, Netflix, and other platforms know what products or content you might like? The answer is Product Recommendation Systems.

A recommendation system uses Artificial Intelligence, Machine Learning, and user behavior data to suggest relevant products to users. These systems can analyze previous purchases, product views, ratings, searches, and preferences to generate personalized recommendations.

🔥 In this guide, you’ll learn:

✅ What is a Product Recommendation System?
✅ How Recommendation Systems Work
✅ Different types of recommendation approaches
✅ Collaborative Filtering
✅ Content-Based Recommendation
✅ Hybrid Recommendation Systems
✅ Role of Machine Learning in Recommendations
✅ Real-world applications
✅ Benefits of personalized recommendations

💡 Recommendation systems are widely used in e-commerce, entertainment, online shopping, streaming platforms, and personalized services.

📖 Read the Complete Guide:
https://updategadh.com/product-recommendation-systems/

🎓 Useful for:
Python & AI Learners • Data Science Students • Machine Learning Projects • BCA/MCA Students • College Projects

📢 More Projects & Tutorials: @ProjectWithSourceCode

#ProductRecommendation #RecommendationSystem #AI #MachineLearning #Python #DataScience #ArtificialIntelligence #MLProjects #PythonProjects #CollegeProjects #BCA #MCA #UPDATEGADH