Competitive Programming 19??

Competitive Programming 19??

Day 19: Trapping rain water,max sum subarrays, answerkey and more!

Hello Developers! Today i'm excited to share the insights of today's journey. I am glad that i am observing constant improvement in me while coding and explaining the code.

Here is a brief information of what i did today:

  1. Trapping rain water: calculating how much water can be trapped in between bars of different heights after it rains. using twoPointers to track maximum heights on both sides of each bar we can calculate the trapped water.
  2. Maximum Sum Subarray (kadane’s algorithm): finding the contiguous subarray within a 1D array which has the largest sum. kadane’s Algorithm simplifies the problem to linear time complexity by maintaining a running sum and updating the maximum sum encountered during traversal.
  3. Answer Key: Here i used recursion and bactracking which simplifies the problem and efficiently handle comparsion operations and return maximum flips has been made.
  4. Spells and Potions: In this problem there are lists of spells and potions, and then how many potions each spell can neutralize based on given rules. This problem involves iterating through lists and applying conditions.Implementing binary search to efficiently determine the effectiveness of each spell against the potions.

These problems were great practice and consolidation of basics before moving to harder challenges.Each problem solved brings you closer to mastering coding challenges.

Remember Winston Churchill’s quote: “Success is going from failure to failure without losing your enthusiasm.”

Stay curious, keep solving and let’s grow together! ??

#CodingJourney #TrappingRainWater #MaxSumSubarray #AnswerKey #Subsequence #SpellsAndPotions #LeetCodeEasy #AlgorithmBasics #ProgrammingSkills #TechGrowth #LearnToCode #TechPassion #ProblemSolving

要查看或添加评论,请登录

Meghana Manchala的更多文章

  • Competitive Programming 61??

    Competitive Programming 61??

    Day 61: Counting the Number of Islands in an Image, Top K Frequent Words, Permutations II, LRU Cache Dear Developers!…

  • Competitive Programming 60??

    Competitive Programming 60??

    Day 60: Permutations,subsets,letter combi Hi everyone! ?? Today, I dedicated time to work on some exciting coding…

  • Competitive Programming 54??

    Competitive Programming 54??

    Day 54: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

  • Competitive Programming 53??

    Competitive Programming 53??

    Day 53: Counting the Number of Islands in an Image, Top K Frequent Words, Permutations II, LRU Cache Dear Developers!…

  • Competitive Programming 52??

    Competitive Programming 52??

    Day 52: Cookie Handout, Lemonade Change, Maximum Units on a Truck, Two-City Scheduling and Jump Game Hello Developers!…

  • Competitive Programming 56??

    Competitive Programming 56??

    Day 56: Square of Sorted Array, Remove Element, Reverse Only Letters, Pivot Index and Check If Array Is Sorted and…

  • Competitive Programming 50??

    Competitive Programming 50??

    Day 50: Implement Queue using Stacks, Design Circular Queue, Counting Bits, Partition Labels and Candy Dear Developers!…

  • Competitive Programming 49??

    Competitive Programming 49??

    Day 49: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

  • Competitive Programming 48??

    Competitive Programming 48??

    Day 48: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

  • Competitive Programming 47??

    Competitive Programming 47??

    Day 47: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

社区洞察

其他会员也浏览了