AtCoder Beginner Contest 363 1. How much must be added to round it off to nearest hundred.For example : 137 -> 200. 2. Check greedily is number of person hair length is greater than T.If its greater than P then print 0 else check how many people hair length is greater than T and for remaining P check the person with smallest hair and return T - smallest person hair length. 3. Generate all the permutation of string and check if its substring contain a palindrome of length K then it is not a valid permutation.I used (next_permutation) function to generate possible strings. 4. Tried generating some kind of series but was not able to formulate it much briefly.Need to upsolve. 5.Maintain a priority queue such that it store the boundary cells elevation and coordinates. When the queue's top elevation is less than equal to ith elevation then we will remove and it move in 4 direction to check if adjacent cells can be sink and maintain a counter for submerged cells and marked the cell visited.Got wrong answer as was calculating the submerged cell in wrong order. #atcoder #coding #code #cpp #cp #codeforces #python #maths
Giriraj Bidwai’s Post
More Relevant Posts
-
Allhumdullillah! Today I solved 1979. Find the Greatest Common Divisor of the Array at LeetCode. In this problem I was given with an array of numbers. And I have to find the greatest common divisor of the max and min number of that array. I tackled it using the following steps: 1_First I sort the array in the increasing order 2_Secondly I declared max and min variables and assigned them values from the sorted list. 3_I employed a while loop which will help me to find the greatest common divisor of the max and min numbers 4_ At last I returned the GCD. Leetcode Challenge #leetcode #leetcodechallenge #leetcodestreak #leetcode2024 #problemsolvingskills #problemoftheday #LeetCode #Coding #Programming #Algorithm #ProblemSolving #Tech #SoftwareEngineering #DeveloperCommunity #CodeChallenge #CareerDevelopment #TechSkills #InterviewPrep #DataStructures #Algorithms #SoftwareDevelopment #CodeNewbie #CodeLife #TechTalent #CodingLife #LinkedInLearning
To view or add a comment, sign in
-
Day 25 of leetcode 75 interview questions 2352. Equal Row and Column Pairs Given a 0-indexed n x n integer matrix grid, return the number of pairs (ri, cj) such that row ri and column cj are equal. A row and column pair is considered equal if they contain the same elements in the same order (i.e., an equal array). #leetcode #LeetCode2024 #2352EqualRowandColumnPairs #equalrowandcolumnpairs #EqualRowandColumnPairs #Contest #Challenge #problemsolving #datastructure #algorithms #competitivecoding #codingforbeginners #leetcoder #leetcodemedium #computersciencestudent #codewars #codinginterviewcoach #codingbootcamps #codingdojo #codingmemes #codeforces #algorithm #programminglanguage #codingforkids #datastructuresandalgorithm #datastructures #programmers #computersciencemajor #topcoder
To view or add a comment, sign in
-
AtCoder Beginner Contest 358 Question A : Check if string contains AtCoder and Land if present output Yes else No. Question B : Given the person comes ticket counter at ith time just iterate and if the previous customer time is greater than next customer arriving time we will add the time required in the max of completion time of previous customer and next customer arriving time. Question C : Dp problem to visit minimum stand to collect all the type of popcorn states are the popcorn picked and the index use mask to store the types of popcorn picked. Question D : Sort the both arrays.While iterating just check which candy box can be picked greedily and add it to the min heap.Lastly if possible pick the M boxes with minimum cost and output cost if not possible then -1. Question E : Used dp to maintain the states such that number of possible ways of constructing string of length l and character type j.We will start from string length of 1 to k and next we have option to create the string of length k using the character from a to z and the frequency of character is given we can use it upto the maximum frequency such that the length condition is maintained and the position of arranging the character can be calculated effectively using Fermat little theorem. #code #coding #atcoder #cp #cpp #Contest #maths #leetcode #python #codechef #codeforces
To view or add a comment, sign in
-
Today's Coding Challenge: ✨ Solved Two Swaps using simple math on GFG! 🔢💡 Keeping up the momentum and loving the challenge. 🚀 #DailyCodingChallenge #LeetCode #Math #ProblemSolving #Coding #Algorithms #CPlusPlus #WomenInTech
To view or add a comment, sign in
-
Day 3 of solving a Leetcode problem for every single day and today's question was question number 75. sorting colors where we are given an array containing 3 elements 0 1 and 2...My approach towards this question was to make two pointers i and j and traverse j through out the array and perform swapping function if the j th element is 0 and 2 and dimpy increment j if the jth element is 1. I'd love to hear your approach towards this question #datastructures #coding #programming #algorithm #c++#programmer #datastructure #coder #computerscience #algorithms #software #datastructuresandalgorithms #coders #learn #codingbootcamp #technology
To view or add a comment, sign in
-
Let's talk about today's LeetCode Weekly Contest 389. Question 1- Existence of a Substring in a String and Its Reverse solution - Just simply reverse the string and with the 2 vector simply store all the substring and check is it exist or not . Submission :https://lnkd.in/gN3hZBaz Question 2 -Count Substrings Starting and Ending with Given Character solution - Just using map simply store the frequency of character c in s submission:https://lnkd.in/gGAJkhRT Question 3 - Minimum Deletions to Make String K-Special solution - not solved 😥 Follow:KRISHNA NAND MISHRA #leetcodechallenge #leetcode #contest #globralRank #weekly #gfg #rank #learning #linkedin #coding #consistency #codingjourney
To view or add a comment, sign in
-
🚀 🚀 DAY 9 of #28daysofcode :- Hey linkedIn people!!!👋 🌟 Today, i have revised the basic concepts of character arrays i.e, syntax, operations like finding the length, reversing and concatenating a string. Also, i have also revised strings and solved various problems on it like:- 1️⃣ check anagrams 2️⃣ check palindromes 3️⃣ to find the lexicographically largest string 4️⃣ generate sub-strings 5️⃣ count palindromic sub-strings I would love to connect with you people at any hour here on the LinkedIn. You can even drop your suggestions in the following comment box.. #28daysofcode #codingchallenge #DSA #algorithms #problemsolving #dailylearning #Arrays #codingskill #techlearning #coding #programmingjourney #techskills #codelife #leetcode #codeforces #learningtogether #dailychallenge #strings #characterarrays #complexities
To view or add a comment, sign in
-
#365daychallenge of solving problems on #leetcode Day : 312/365 No. of problems solved : 01 1598. Crawler Log Folder Total : 333 #dailycoding #dsa #codingchallenge #codechallenge #coding #datastructures #algorithms #coding #programming #problemsolving #365daysofcode
To view or add a comment, sign in
-
Today completed an insightful lecture on solving the "Permutation in String" problem on LeetCode! 🧩 This problem offers a great way to dive into string manipulation and sliding window techniques. Multiple approaches were covered, from brute-force to optimized solutions, making it much easier to follow and apply in real coding scenarios. 💻 If you're interested in challenging yourself, you can try it out here: https://lnkd.in/dgU-Xi73 #ProgrammingJourney #Strings #Algorithms #DataStructures #Programming #Coding #LeetCode #ProblemSolving
To view or add a comment, sign in
-
🚀 Day 53 of 100 Days of Code: Solved the "Reverse String" Problem! 🚀 Today, I tackled the "Reverse String" problem, which involves reversing the characters in a given string. This problem is fundamental for understanding basic string manipulation techniques. Key learnings from this problem include: Understanding and implementing basic string manipulation. Utilizing the two-pointer technique for efficient problem-solving. Completing this problem has further enhanced my understanding of string manipulation and problem-solving techniques. Excited to continue exploring more challenging problems and honing my coding abilities! 🌟 #100DaysOfCode #DSAChallenge #Programming #Algorithms #StringManipulation #ProblemSolving #Coding
To view or add a comment, sign in
🇮🇳🇮🇳 | SDE Intern @RareLabs | IIITR CSE'26 | Leetcode - Knight | CodeChef 3⭐ | Codeforces(Specialist)
5moThere's a simple pattern for solving 4th. You may look it up here : https://math.tools/list/palindromes