Blogs Hub

by AskGif | Oct 19, 2020 | Category :coding

3Sum - Array - Medium - LeetCode

3Sum - Array - Medium - LeetCode

Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Notice that the solution set must not contain duplicate triplets.   Example 1: Input: nums = [-1,0,1,2

read more...

by AskGif | Oct 18, 2020 | Category :coding

Container With Most Water - Array - Medium - LeetCode

Container With Most Water - Array - Medium - LeetCode

Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which, together with the x-axis forms a container, such that the container contains the m

read more...

by AskGif | Apr 18, 2020 | Category :coding

Longest Substring Without Repeating Characters

Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. &nbsp; Example 1: &nbsp; Input: "abcabcbb" Output: 3&nbsp; Explanation: The answer is "abc", with the length of 3.&nbsp; Example 2: &nbsp; <p

read more...

by AskGif | Apr 18, 2020 | Category :coding

Add Two Numbers in Linked List (In reverse Order)

Add Two Numbers in Linked List (In reverse Order)

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contains a single digit. Add the two numbers and return them as a linked list. You may assume the two numbers do not contain any leading zero, ex

read more...

by AskGif | Apr 18, 2020 | Category :coding

Add Two Numbers in Linked List In Given Order

Add Two Numbers in Linked List In Given Order

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in order and each of their nodes contains a single digit. Add the two numbers and return them as a linked list. &nbsp; You may assume the two numbers do not contain any leading z

read more...