Hiii!!!
just solved (find the number of occurrence)
approach:
1. find first occurrence at which index
2. find last occurrence at which index
3. return last occurrence- first occurrence +1
#DSA#pythonprogramming#LearnInPublic
Hiii!!!
solved problem #34 leetcode( Find First and Last Position of Element in Sorted Array)
used lowerbound and upperbound logic to solve it
#DSA#Python#LearningInPublic
Namaste Doston!!! Solved leetcode problem no. 237(delete node in a linked list) idea:Copy the next node’s value into the given node and skip the next node to delete it from the list. #python#LeetCode#DSA#programming#EngineersDay2025
👋 Hi everyone!
🧠 Learning update:
✔️ Revising DBMS, OS, Computer Networks & OOPs
✔️ Solving problems in C
✔️ Working on Data Structures & Algorithms using Python
✔️ Just getting started with Django!
Namaste!!!!
solved leetcode problem number 49(group anagrams)
Idea:
Grouped words that are anagrams by sorting each word and using the sorted result as a key to collect similar words together.
#LeetCode#coding#Python#DSA
Hi!!!!!
Solved leetcode problem number 242 today
Idea: Counted chars from ‘s’, subtracted using ‘t’; if any count drops below zero or a char is missing, it’s not an anagram - this ensures equal occurrences
Hi!!!
Today I solved LeetCode 217 (Contains Duplicate):
Idea:
Put the values of nums in a set, then compare the lengths. If they are unequal, return True; otherwise, return False.
🚀 Built a simple Python project:
Snake 🐍 | Water 💧 | Gun 🔫
-Just if-elif-else for logic
-random.choice() for computer’s move
Super simple, yet fun to code! 🧑💻✨
#pythonprogramming
Hi!!!
Solved Problem (189 Rotated Array) on LeetCode today:
Problem: Rotate an array k steps to the right.
Trick: Just use reverse 3 times ✨
Steps:
1. Reverse the whole array
2. Reverse the first k elements
3. Reverse the rest