Author
Rikam Palkar
.NET Full Stack, DSA, C#, Blazor, WPF
Mumbai (India)
Recognitions & awards
    • Jun 2020
    • Jun 2021
    • Jun 2022
    • Jun 2023
    • Jun 2024
Awards & Certifications
About
"Microsoft MVP", Five-time C# Corner "Most Valuable Professional", "Verified author" on Medium and a "Top voice" on LinkedIn, Author behind 'WPF Simplified' and 'Blazor Simplified'.I'm passionate about making the world a better place by writing scalable, efficient code, I'm skilled at Blazor, WPF, C#, and Data Structures & Algorithms.
Activity

#Leetcode: 2799. Count Complete Subarrays in an Array

#Algorithm
1. Count unique numbers
2. Use sliding window.
3. Track counts of numbers in the current window with map.
4. For each left, move right until the window has all unique numbers.
5. If it does, add the number of complete subarrays starting at left.
6. Return the total count.

#Problem:
https://leetcode.com/problems/count-complete-subarrays-in-an-array/description/?envType=daily-question&envId=2025-04-24

#Solution: https://github.com

Image previewImage preview

#Leetcode 1399. Count Largest Group


Time complexity: O(n log n), digit sum

Space complexity: O(log n), hash map


#Problem:
https://leetcode.com/problems/count-largest-group/editorial/?envType=daily-question&envId=2025-04-23


#Code: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/1399. Count Largest Group.cs


DSA ProblemSolving Programming

Image previewImage preview

Question was just vague bunny gossip

#Algorithm:
1. Count how many rabbits gave same answer and group them together
2. If some rabbits don’t fit in a full group, make an extra group (%)
3. Add up all rabbits from all groups


#Time: O(n)
#Space: O(n)

Problem:
https://leetcode.com/problems/rabbits-in-forest/?envType=daily-question&envId=2025-04-20


Solution: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/781. Rabbits in Forest.cs


#Leetcode #ProblemSolving #DSA

Image previewImage preview

When Recursion gives you TLEs, just sort and move on!

#Algorithm:

1. Sort the array → so we can use the two-pointer trick

2. Count pairs with sum ≤ upper

3. Count pairs with sum < lower

4. Subtract those to get the number of fair pairs


Time: O(n log n)

Space: O(1)


#problem:
https://leetcode.com/problems/count-the-number-of-fair-pairs/?envType=daily-question&envId=2025-04-19


#Code: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/2563. Count the Number of Fai

Image previewImage preview
 Hosting a Static Website with Docker and NGINX

Hosting a Static Website with Docker and NGINX

1w 3.4k 0

Leetcode: 38. Count and Say

Time: O(n * L)
Space: O(n + L)

Problem:
https://leetcode.com/problems/count-and-say/description/?envType=daily-question&envId=2025-04-18


Code: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/38. Count and Say.cs

#DSA #ProblemSolving #Programming

Image previewImage preview

I tried to optimize, but brute force seems to be the way.
Leetcode 2176
Problem:
https://leetcode.com/problems/count-equal-and-divisible-pairs-in-an-array/?envType=daily-question&envId=2025-04-17

Solution: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/2176. Count Equal and Divisible Pairs in an Array.cs

Image previewImage preview
Docker vs. Virtual Machines (VMs)

Docker vs. Virtual Machines (VMs)

1w 4.4k 0

500 #LeetCode questions later & if you ask me to explain recursion, I’ll just say it might actually be a pyramid scheme!


Profile:
https://leetcode.com/u/Rikam/


#DSA #ProblemSolving #Programming

Image previewImage preview

% vs string builder

Time: O((high - low + 1) * sb) => O(high−low)

Space: O(1)


#Leetcode: 2843. Count Symmetric Integers

#problem:
https://leetcode.com/problems/count-symmetric-integers/?envType=daily-question&envId=2025-04-11


#Code: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/2843. Count Symmetric Integers.cs


#DSA #ProblemSolving

Image previewImage preview

Easy, but I aged three years trying to decode the description.


Time: O(2n) =>O(n)

Space: O(n)


#Leetcode 3375. Minimum Operations to Make Array Values Equal to K


#Problem:
https://leetcode.com/problems/minimum-operations-to-make-array-values-equal-to-k/description/?envType=daily-question&envId=2025-04-09


#Solution: https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/3375. Minimum Operations to Make Array Values Equal to K.cs


#DSA #ProblemSolving #Programm

Image previewImage preview

Apparently (i + 1) / 3 was too optimistic!

Easy:
Time: O(n)
Space: O(n)

Leetcode 3396

Code:
https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/3396. Minimum Number of Operations to Make Elements in Array Distinct.cs

Problem: https://leetcode.com/problems/minimum-number-of-operations-to-make-elements-in-array-distinct/?envType=daily-question&envId=2025-04-08

DSA, Programming

Image previewImage preview

Leetcode 368. Largest Divisible Subset

Algorithm
1. Sort the input array in ascending order to ensure that if a is divisible by b, an appears after b.

2. Create a dp array where dp[i] represents the size of the largest divisible subset that ends at index i.


3. For each element at index r from left to right, check all previous elements at indices less than r. If nums[r] is divisible by nums[l], update dp[r] as the maximum of its current value and dp[l] plus 1.

4. Backtrack from the end

Image previewImage preview
Re: Textboxes Not Working

Re: Textboxes Not Working

Re: Why we need Data Templates in XAML UI Design ?

Re: Why we need Data Templates in XAML UI Design ?

Re: c#.net listbox update problem

Re: c#.net listbox update problem

Re: how to update VB .net code to C#

Re: how to update VB .net code to C#

Re: How to display below data using Sql Query

Re: How to display below data using Sql Query

Docker:  Install, Run, and Test Your First Container - DotNet series

Docker: Install, Run, and Test Your First Container - DotNet series

3w 7.7k 0

O(n^3) => O(n)

Leetcode 2873. Maximum Value of an Ordered Triplet I

Code:
https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/2873. Maximum Value of an Ordered Triplet I.cs

Image previewImage preview
Suggested learning
View all