1,724 articles across 10 categories

Stories, Tutorials & Life Tips

Deep dives on coding, health, recipes, travel and everything in between.

πŸ“ Explore Reading Paths

Follow curated journeys from beginner to expert

Implement Stack using Queues - Stack - Easy - LeetCode
Featured

Implement Stack using Queues - Stack - Easy - LeetCode

Implement the following operations of a stack using queues. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Return whether…

1 min read3 Oct 2020
Read article
Binary Watch - Immutable - Array - Easy - LeetCode

Binary Watch - Immutable - Array - Easy - LeetCode

A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minute…

1 min3 Oct
Range Sum Query - Immutable - Array - Easy - LeetCode

Range Sum Query - Immutable - Array - Easy - LeetCode

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given …

1 min3 Oct
House Robber - Array - Easy - LeetCode

House Robber - Array - Easy - LeetCode

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, t…

1 min3 Oct
Peak Index in a Mountain Array - Array - Easy - LeetCode

Peak Index in a Mountain Array - Array - Easy - LeetCode

Let's call an array arr a mountain if the following properties hold: arr.length >= 3There exists some i with 0 < i…

1 min3 Oct
Find Smallest Letter Greater Than Target - Array - Easy - LeetCode

Find Smallest Letter Greater Than Target - Array - Easy - LeetCode

Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the …

1 min3 Oct
AIIMS Report Rules Out Sushant Singh Rajput Murder Theories, Say Sources

AIIMS Report Rules Out Sushant Singh Rajput Murder Theories, Say Sources

Actor Sushant Singh Rajput was not murdered and it is a case of suicide, a team of doctors from Delhi's AIIMS has said i…

3 min3 Oct
Binary Search - Array - Easy - LeetCode

Binary Search - Array - Easy - LeetCode

Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search targ…

1 min3 Oct
Heaters - String - Easy - LeetCode

Heaters - String - Easy - LeetCode

Winter is coming! Your first job during the contest is to design a standard heater with a fixed warm radius to warm all …

2 min3 Oct
Is Subsequence - String - Easy - LeetCode

Is Subsequence - String - Easy - LeetCode

Given a string s and a string t, check if s is subsequence of t. A subsequence of a string is a new string which is form…

1 min3 Oct
Guess Number Higher or Lower - String - Easy - LeetCode

Guess Number Higher or Lower - String - Easy - LeetCode

We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I pic…

1 min3 Oct
First Bad Version - String - Easy - LeetCode

First Bad Version - String - Easy - LeetCode

You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of yo…

1 min3 Oct
Rearrange Spaces Between Words - String - Easy - LeetCode

Rearrange Spaces Between Words - String - Easy - LeetCode

You are given a string text of words that are placed among some number of spaces. Each word consists of one or more lowe…

2 min2 Oct
Replace All ? to Avoid Consecutive Repeating Characters - String - Easy - LeetCode

Replace All ? to Avoid Consecutive Repeating Characters - String - Easy - LeetCode

Given a string s containing only lower case English letters and the '?' character, convert all the '?' characters into l…

1 min2 Oct
Thousand Separator - String - Easy - LeetCode

Thousand Separator - String - Easy - LeetCode

Given an integer n, add a dot (".") as the thousands separator and return it in string format.   Example 1: Input: …

1 min2 Oct
Blog β€” Page 14 | AskGif