How to trim characters from a string in JavaScript

Trimming is the process of removing some characters from the beginning or end of a string, such as whitespaces, punctuation marks, digits, etc.

Oct 03, 2023#javascript

Longest Palindromic Substring

Identify the longest substring within a given input string that forms a palindrome, which is a sequence of characters that reads the same forwards as it does backward.

How to use forEach with object in JavaScript

While forEach method is commonly used to iterate through arrays, it can also be chained with Object.keys, Object.values, and Object.entries to iterate object key-value pairs.

Oct 01, 2023#javascript

How to add days to current date in JavaScript

Learn how to use the Date object and its methods or open-source date time libraries to easily add days to the current date in JavaScript with this simple tutorial.

Sep 28, 2023#javascript#how-to

How to use lazy variables in Swift

This can be useful when the initial value of a variable is expensive to compute, or when it is not needed until it is actually used in the code.

Sep 27, 2023#swift#ios

Roman to Integer

This problem typically asks you to implement a function or method that takes a Roman numeral as input and returns the corresponding integer.

Sep 24, 2023#leetcode#dsa

Top 10 LeetCode problems for coding interviews

We will explore the top 10 problems on LeetCode that have consistently stumped and challenged developers worldwide.

Sep 24, 2023#leetcode#dsa

Maximum Subarray

A classic coding challenge that asks you to find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.

Sep 24, 2023#leetcode#dsa

Merge Intervals

A classic algorithmic problem that involves merging overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.

Sep 24, 2023#leetcode#dsa

Palindrome Number

A palindrome is a number that reads the same forwards and backward. In other words, when its digits are reversed, the resulting number remains the same.

Sep 24, 2023#leetcode#dsa

Reverse Integer

You have to reverse the digits of a given 32-bit integer and return the reversed integer. If the reversed integer is out of the range of 32-bit integers, you should return 0.

Sep 24, 2023#leetcode#dsa

How to filter object by keys or values in JavaScript

When dealing with sensitive data, by selecting only the keys you need, you can create a new object that contains a more concise and relevant subset of data.

Sep 20, 2023#javascript

How to delay code execution in JavaScript

JavaScript does not have a built-in sleep function like some other programming languages. There are several ways to mimic that behavior depending on your needs and preferences.

Sep 19, 2023#javascript

Course Schedule

The problem of Course Schedule on LeetCode is to determine if it is possible to finish all courses given the prerequisites.

Sep 19, 2023#dsa#leetcode

Longest Increasing Subsequence

The problem of finding the longest increasing subsequence of a given array of integers is a classic dynamic programming problem.

Sep 17, 2023#dsa#leetcode