
CS student 👨🏾💻 || Front-end dev || React Native dev @dekawise. I am going up one level in developing and solving problems 🎗
Joined January 2025
- Tweets830
- Following207
- Followers164
- Likes755
Day 28: Finding the first index of occurence in a string solved on Leetcode.
Here, it searches for the first occurrence of `needle` inside `haystack`. It checks each possible position in the string by taking a substring of the same length as `needle` and comparing them. #LeetCode
1
34
Day 13: Solved Roman to Integer on Leetcode 🎗️
I created a map of all the Roman numerals with their respective integers as key-value pairs. And then I iterated over each character of the string, & on each iteration, we would check the value of the current character #LeetCode
3
18
Day 12: Solved Integer to Roman on Leetcode 🎗.
The main idea behind this algorithm is not trying to construct rules such as 4, 9, 40, 90 but rather adding these cases directly into the list of numbers to be checked. #LeetCode
6
36
Day 11: Solved container with most water using two-pointer approach on Leetcode 🎗
Using two pointers starting from opposite ends, I calculate the area and track the maximum. I always move the pointer at the shorter line because it limits the height. #LeetCode
3
21
Day 10: Solved Regular expression matching on Leetcode 🎗.
Base: if pattern ends, string must end too.
If `x*` pattern: skip it OR match one char & stay.
Else: simple char match, move both.
Cache results to avoid recomputation.
#leetcode #coding #javascript
2
21
Day 9: Palindrome number challenge solved on Leetcode 🎗️
I used .toString() to convert the number, .split() to make an array, .reverse() to reverse it, and .join() to rebuild the string. Then I compared both strings.
2
13
Day 8: Solved String to integer on Leetcode 🎗
Skipped the whitespace, check for a '+' or '-' sign, then read digit characters using left shift and addition until a non-digit or end of string. Apply the sign, then clamp the result to the signed 32-bit integer range. #LeetCode
3
24
Back at it. Took a break from my daily coding practice, but we're back on track today on leetcode.
1
20
Day 7: Reverse Integer solved on Leetcode 🎗️
First of all, the input that was given is, x = -123, is converted into the positive using Math.abs(x), a Math method for absolute values, .toString() method is applied in order to represent the number as a string
2
99
Day 6: Zigzag Conversion solved in Leetcode 🎗️
If 'numRows' is 1, I just return the string, no zigzag possible. Otherwise I fill an array of rows one character at a time, bouncing between the first and last row by flipping a 'step' variable to reverse direction
#LeetCode
2
136
Day 5: Longest Palindromic substring solved in Leetcode 🎗
I made a little research about what a Palindrome is, it reads the same characters forward and backward, bab, aba and cbbc. Every palindrome has a center, it is either a character, odd length, like the a in bab
#LeetCode
3
24
Day 4: Median of two sorted array completed in Leetcode 🎗️
I created a function and gave it two parameters, nums1 and nums2 then in the arrays into one by using the spread operator..., then sorts the array in increasing order with the method .sort((a, b) => a - b).
4
68
Day 3: Longest Substring without repeating characters solved 🎗.
I used a sliding window with the newSet obj to solve it. Track window with left/right pointers, shrink from left when a duplicate shows up, and record the max window size. O(n) time #100DaysOfCode #js #TechTrends
3
220





































