Rikam Palkar background image
Author
Rikam Palkar
Solution Architect, .NET Full Stack, DSA, C#, React, Blazor, WPF, JavaScript
Mumbai (India)
Recognitions & awards
    • Jun 2020
    • Jun 2021
    • Jun 2022
    • Jun 2023
    • Jun 2024
    • Jun 2025
Badges
Awards & Certifications
  • AWS Solutions Architect
    AWS
  • MCA
    VJTI
About

"Microsoft MVP", "AWS Solutions Architect" Five-time "C# Corner MVP", "Verified author" on Medium "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
Foundation Models: Everything, Everywhere, All at Once!

Foundation Models: Everything, Everywhere, All at Once!

21h 283 0
The ABCs of Deep Learning

The ABCs of Deep Learning

21h 865 0
The ABCs of Machine Learning

The ABCs of Machine Learning

21h 1.1k 0
Layers of Artificial Intelligence

Layers of Artificial Intelligence

22h 1.8k 0
Why Learning AWS Changed How I See Modern Tech - AWS Solutions Architect A...

Why Learning AWS Changed How I See Modern Tech - AWS Solutions Architect A...

4w 359 0
Easy way to Handle cancellation of API Requests in React with AbortSignal ...

Easy way to Handle cancellation of API Requests in React with AbortSignal ...

Aug 20 423 0
Re: Angular vs React with .NET in 2025 – Which Should I Learn?

Re: Angular vs React with .NET in 2025 – Which Should I Learn?

Jun 16 Forum
You’re Using useState for That? Cute

You’re Using useState for That? Cute

Jun 15 584 0

Bob here changed one digit & suddenly became richer than Elon.

#Algorithm
To get the max number: First digit has to be 9, loop till you find digit is < 9 then replace all occurrences of that first digit with 9.
To get the min number: Same as first step, here first digit has to be 1
Return: max - min.

#GitHub:
https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/2566. Maximum Difference by Remapping a Digit.cs

#Algorihm #Coding #Programming

Image previewImage preview
Post Jun 14

Tried Greedy with 2 sorts, didn’t Cut It hence Binary Search!

#Algorithm
- Sort the Array
-- So we can try to pair close numbers and minimize the differences.

- Binary Search
- The smallest possible max difference is 0, the largest is max(nums) - min(nums).
- Guess a Difference (mid) and Try It
- Check if We Can Form p Pairs where mid <= p
-- If yes, try a smaller mid. If no, try a bigger one.

- When l == r, you've found the smallest max difference that allows p pairs.

Image previewImage preview
Post Jun 13

Its easy problem today guys

Image previewImage preview
Post Jun 12
Wrapper Component to Consumer Component: That’s a Wrap!

Wrapper Component to Consumer Component: That’s a Wrap!

Jun 09 740 1

DFS and Maths should never be combined!

#Algorithm
- DFS numbers 1 to 9
- Base condition: If the current number exceeds n, stop recursion.
- Else add the current number to the result list.
Multiply the number by 10 to get to the next level (1 - 10, 10 - 19, 100 - 109).
- For the deeper level:
-- If the next level starting number exceeds n, return.
-- Else, recurse for each number in the range [curr number, curr number, + 9].

Image previewImage preview
Post Jun 08

Thought of Queue first! Stack approach was easy for edge cases!
#Algorithm
- 26 stacks: one for each letter ('a' to 'z'), to store the indices of those characters.
- Loop input string: Convert the input string into a character array for updates.
- For each character:
-- If it’s a letter, push its index onto the stack corresponding to that letter.
-- If it’s a *, find the smallest letter stack (from 'a' to 'z') that is not empty, pop its top index, and mark that character as '0' - placeholder

Image previewImage preview
Post Jun 07

It seems like robots and AI are taking over everything these days!

#Algorithm
- Count the frequency of each character in s.
- Use a stack to hold letters as you process s from left to right.
- Track the smallest character from current index to end of s.
- At each step, move the current letter to the stack and update frequency.
- Pop from the stack to the result whenever the top of the stack is ≤ the smallest left character.

Code:
https://lnkd.in/ebraFu_M

#DSA

Image previewImage preview
Post Jun 06
useRef: The React Hook You’re Sleeping On

useRef: The React Hook You’re Sleeping On

Jun 06 803 0

DSU Was Right There, But Not in My Head

Disjoint Set Algorithm!


#Algorithm

- Convert each char to num and form DSU of both strings

- When Union, always choose the smaller character as the group’s parent to ensure the smallest lexicographical representative.

- Return parent of each node


#Code:
https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/1061. Lexicographically Smallest Equivalent String.cs


#DSA #Programming #Leetcode


Image previewImage preview
Post Jun 05
Understanding useState in React

Understanding useState in React

Jun 04 816 0

Who Hid the Candies, deep down the graph?


#Algorithm

- Process boxes in the order you discover them, so BFS hence queue

- If a box is unopened and can be opened (status == 1), open it, collect candies, and mark it as opened.

- Add all the contained boxes and newly unlocked keys to your queue, update their status = 1.

- Repeat until there are no more boxes in the queue.

Image previewImage preview
Post Jun 03

After a Bunch of Trial and Error!

#Leetcode 135


#Algorithm:

1 - left-to-right pass:

If the next child’s rating is higher, they get 1 more candy than the previous.

2 - Do a right-to-left pass:

If the previous child’s rating is higher, ensure they have at least 1 more candy than the next child.

3. Sum up the candies.


#Code:
https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/135. Candy.cs


#DSA #Programming

Image previewImage preview
Post Jun 02