Day 20/100 of #100DaysOfCode
- Problem Solved: 145. Binary Tree Postorder Traversal, 94. Binary Tree Inorder Traversal and 144. Binary Tree Preorder Traversal
- Topic Covered: Binary Tree
- Approach: using Recursion
#Leetcode#DSA#Cpp#ProblemSolving#computerScience
Day 17/100 of #100DaysOfCode
- Problem Solved: 19. Remove Nth Node From End of List
- Topic covered: LinkedList
- Approach: First I found the node to be deleted from beginning and then the problem becomes delete kth node from beginning and then I solve it.
#Leetcode#DSA#Cpp
Day 16/100 of #100DaysOfCode
- Problem Solved: 142. Linked List Cycle II
- Topic Covered: LinkedList
- Approach: Use unordered map to keep track of LL elements and when a repeated element found return that element
#Leetcode#DSA#Cpp#CodingJourney#Programming
Day 15/100 of #100DaysOfCode
- Problem Solved: 237. Delete Node in a Linked List
- Topic Covered: LinkedList
- Approach: At first glance I was confused about how to tackle this since the head isn't given in the LL. After sometime I got the solution and solve it using the node
Day 13/100 of #100DaysOfCode
- Problem solved: 34. Find First and Last Position of Element in Sorted Array
- Topic covered: Binary Search
- Topic learned: LinkedList
- Approach: Search the first occurrence in left side and last occurrence in right side after calculating mid.
Day 12/100 of #100DaysOfCode
- Problem solved: 69. Sqrt(x)
- Topic covered: Binary Search
- Topic Learned: LinkedList
- Approach: Instead of using pow() function in C++, I use mid*mid approach and then compare it to x to get the result
#Leetcode#DSA#Cpp#Consistency#Learning
Day 10/100 of #100DaysOfCode
- Problem Solved: 81. Search in Rotated Sorted Array II
- Topic Covered: Binary Search
- Approach: Find the pivot element (k) using linear search (to avoid duplicates) then divide the array into two parts (0, k-1), (k, n-1) then perform binary search
Day 9/100 of #100DaysOfCode
- Problem solved: 74. Search a 2D Matrix and 33. Search in Rotated Sorted Array
- Approach: Both problems were tackled by binary search with slight modifications
- Topic Covered: Binary Search
#Leetcode#DSA#Cpp#CodingJourney#Consistency
Day 8/100 of #100DaysOfCode
- Problem Solved: 1423 (Maximum points you can obtain from cards), 1358 (Number of Substrings Containing All Three Characters), 1004 (Max Consecutive Ones III)
- Topic Covered: Sliding window and 2 pointers
#Leetcode#DSA#cpp
Day 6/100 of #100DaysOfCode
- Topic covered: 2 pointer technique
- Topic Learned: Binary Search
- Problem Solved: Leetcode 3194. Minimum average of largest (main problem) and smallest element and Leetcode 88. Merge sorted array
- Approach: Classic two pointer approach
#DSA#cpp
Day 5/100 of #100DAysOfCode
- Topic Covered: Sliding Window and 2 Pointer Technique
- Problem Solved: 125. Valid Palindrome
- Approach: 2 Pointer technique, use of STL library to lowercase characters and remove all non-alphanumeric characters in the string
#Leetcode#DSA#cpp
Day 4/100 of #100DaysOfCode
- Topic Covered: Sliding Window and 2 Pointer Technique
- Problem Solved: 643. Maximum Average Subarray I
- Approach: classic sliding window technique
#Leetcode#DSA#cpp#ConstantLearning
Day 3/100 of #100DaysOfCode
- Topic Covered: Arrays and Hashing
- Problem Solved: 205. Contains Duplicate
- Approach: unordered map
I didn't even realize how two hours passed on this problem.
#LeetCode#DSA#Cpp
Day 2/100 of #100DaysOfCode
- Doing questions on Leetcode
- Topic covered: Arrays and Hashing
- Problem solved: 347. Top K Frequent Elements (highlight of the day), 242. Valid Anagram, 217. Contains Duplicate
- Approach: unordered set and map
#Leetcode#DSA#cpp