Week 9 of 55: My Learning Journey ๐
Prashant Joshi
๐ Passionate Programmer | DevOps Enthusiast | Cloud Technology Aficionado โ๏ธ | MCA Student Devouring DevOps Principles & Cloud Tech | On an Exhilarating Journey to Master Computer Applications
June 29, 2024
Day 62 to Day 65 of 360
Programming:
I've tackled a variety of questions, focusing on mastering unique concepts daily.
Date: 23 June 2024
Question 1: 2's Complement of Array
Problem: Get the 2's complement of an array.
Approach:Traverse the array to get the 1's complement by flipping the elements.Use a carry variable and add 1 to each element where needed to obtain the 2's complement.
Question 2: LeetCode 268 - Missing Number
Problem: Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.
Approach:Sort the array.Match the array with its index using Binary Search to deliver the answer in O(logN) time complexity.
2's Compliment
Leetcode-268 | Missing Number
Date: 25 June 2024
Question 1: LeetCode 48 - Rotate Image
- Approach:Transpose the array.Reverse each row to get the final rotated image.
Question 2: LeetCode 136 - Single Number
Problem: Find the single number present in the array.
Approach:Used a hashmap to count each element and then identified the unique one.Alternatively, I could use a Set, but I opted to solve it without sets.
Rotate Image Leetcode - 48
Leetcode - 136 | Single Number
Date: 26 June 2024
Question 1: Extreme Prints of Array
- Approach:Created two pointers to print the elements in a specific order.
Question 2: LeetCode 852 - Peak Element in Mountain Array
Problem: Find the peak element in a mountain array.
Approach:Applied Binary Search with new concepts like search space and peak identification.Used conditions and store-and-compute strategy to solve the question.
Extreme Prints of Array
LeetCode 852 - Peak Element in Mountain Array
Date: 27 June 2024
Question 1: LeetCode 33 - Search in Rotated Sorted Array
Note: This question took over 6 hours with breaks, but I solved it independently.
Approach:Used the peak element concept from the previous day.Applied Binary Search in each part of the array.
Question 2: Return Sum Pair
- Approach:Used a dual loop to find pairs.Considered using a sliding window, but opted to solve it without modifying the array.
LeetCode 33 - Search in Rotated Sorted Array
Return Sum Pair
Summary of DSA and Programming Learning:
- Diverse problem-solving methods and mastering unique concepts through daily questions.
DevOps and Cloud:
- Virtual Machines: Deployed several virtual machines.Created images to upload on Vagrant Hub. Set up complete MySQL and Apache2 servers for a web hosting solution. Used Debian, Ubuntu, and CentOS for these setups.
Note: Due to some shifting preparations and packing of my machines, I cannot post anything before July 15. During this time, I won't be learning new concepts to avoid concentration issues, but I will be revising all the old topics.
What I've Learned and Solved This Week:
Stay tuned for more updates and feel free to connect with me on this journey! ๐
Youtube: https://lnkd.in/dM3f5RPr
Instagram: https://lnkd.in/dq4xRwJR
Github: https://lnkd.in/dhxkbRUv
Hashnode: https://lnkd.in/drsHBbhU
Subscribe to my newsletter
Read articles from Prashant Joshi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Prashant Joshi
Prashant Joshi
Fuelled by boundless passion for DevOps and cloud technologies โ๏ธโ๏ธโ๏ธ โ๏ธ, I'm on an exhilarating journey of mastery of Computer Application (MCA). I'm not just learning; I'm devouring DevOps principles and cloud tech, crafting the future through relentless innovation and automation. ๐