Open in app

Sign in

Write

Sign in

sachin shukla
sachin shukla

8 Followers

Home

About

Sep 11, 2020

DAY 11 Of LeetCode September Challenge !

DAY 11 Of LeetCode September Challenge ! Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: Input: [2,3,-2,4] Output: 6 Explanation: [2,3] has the largest product 6. Example 2: Input: [-2,0,-1] Output: 0 Explanation: The result cannot be 2, because [-2,-1] is not a subarray.

1 min read

DAY 11 Of LeetCode September Challenge !
DAY 11 Of LeetCode September Challenge !

1 min read


Sep 11, 2020

Day 10 of LeetCode September Challenge !

Day 10 of LeetCode September Challenge ! You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint that indicates how many digits…

2 min read

Day 10 of LeetCode September Challenge !
Day 10 of LeetCode September Challenge !

2 min read


Sep 9, 2020

Day 9 of LeetCode September Challenge !

Day 9 of LeetCode September Challenge ! Compare two version numbers version1 and version2. If version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0. You may assume that the version strings are non-empty and contain only digits and the . character. The . character does not…

2 min read

Day 9 of LeetCode September Challenge !
Day 9 of LeetCode September Challenge !

2 min read


Sep 8, 2020

Day 8 of LeetCode September Challenge!

Day 8 of LeetCode September Challenge! Given a binary tree, each node has value 0 or 1. Each root-to-leaf path represents a binary number starting with the most significant bit. For example, if the path is 0 -> 1 -> 1 -> 0 -> 1, then this could represent 01101 in binary, which is 13. For all leaves in the tree, consider the numbers represented by the path from the root to that leaf. Return the sum of these numbers.

1 min read

Day 8 of LeetCode September Challenge!
Day 8 of LeetCode September Challenge!

1 min read


Sep 8, 2020

Day 7 of LeetCode September Challenge !

Day 7 of LeetCode September Challenge ! Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Example 1: Input: pattern = "abba", str = "dog cat cat dog" Output: true Example 2: Input:pattern = "abba", str = "dog cat cat fish" Output: false Example 3: Input: pattern = "aaaa", str = "dog cat cat dog" Output: false

1 min read

Day 7 of LeetCode September Challenge !
Day 7 of LeetCode September Challenge !

1 min read


Sep 8, 2020

Day 6 of LeetCode September Challenge!

Day 6 of LeetCode September Challenge! Two images A and B are given, represented as binary, square matrices of the same size. (A binary matrix has only 0s and 1s as values.) We translate one image however we choose (sliding it left, right, up, or down any number of units), and place it on top of the other image. After, the overlap of this translation is the number of positions that have a 1 in both images.

1 min read

Day 6 of LeetCode September Challenge!
Day 6 of LeetCode September Challenge!

1 min read


Sep 5, 2020

Day 5 of LeetCode September Challenge !

Day 5 of LeetCode September Challenge ! Given two binary search trees root1 and root2. Return a list containing all the integers from both trees sorted in ascending order. Example 1: Input: root1 = [2,1,4], root2 = [1,0,3] Output: [0,1,1,2,3,4] Example 2: Input: root1 = [0,-10,10], root2 = [5,1,7,0,2] Output: [-10,0,0,1,2,5,7,10] Example 3: Input: root1 = [], root2 = [5,1,7,0,2] Output: [0,1,2,5,7]

1 min read

Day 5 of LeetCode September Challenge !
Day 5 of LeetCode September Challenge !

1 min read


Sep 5, 2020

Day 4 of LeetCode September Challenge !

Day 4 of LeetCode September Challenge ! A string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts. Example 1: Input: S = "ababcbacadefegdehijhklij" Output: [9,7,8] Explanation: The partition is "ababcbaca", "defegde", "hijhklij". This is a partition so that each letter appears in at most one part. A partition like "ababcbacadefegde", "hijhklij" is incorrect, because it splits S into less parts.

1 min read

Day 4 of LeetCode September Challenge !
Day 4 of LeetCode September Challenge !

1 min read


Sep 5, 2020

Day 3 of LeetCode September Challenge !

Day 3 of LeetCode September Challenge ! Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string consists of lowercase English letters only and its length will not exceed 10000. Example 1: Input: "abab" Output: True Explanation: It's the substring "ab" twice. Example 2: Input: "aba" Output: False

1 min read

Day 3 of LeetCode September Challenge !
Day 3 of LeetCode September Challenge !

1 min read


Sep 2, 2020

Day 2 of LeetCode September Challenge !

Day 2 of LeetCode September Challenge ! Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute difference between i and j is at most k. Example 1: Input: nums = [1,2,3,1], k = 3, t = 0 Output: true Example 2: Input: nums = [1,0,1,1], k = 1, t = 2 Output: true Example 3:

1 min read

Day 2 of LeetCode September Challenge !
Day 2 of LeetCode September Challenge !

1 min read

sachin shukla

sachin shukla

8 Followers

Being✖ Becoming ✔ ☻

Following
  • Sachin Shukla

    Sachin Shukla

  • Aanchal Patial

    Aanchal Patial

  • Kumar Shivam

    Kumar Shivam

  • Kumari Shilpa

    Kumari Shilpa

  • Shashi Dubey

    Shashi Dubey

See all (11)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams