## Implement strStr() – Leetcode Python Solution

LeetCode has a Easy coding Problem in Its’ Algorithm Section “Implement strStr()”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE Question Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Clarification: What should we return when needle is an empty string? This is … Read more

## Remove nth node from end of list Leetcode Python

LeetCode has a Medium coding Problem in Its’ Algorithm Section “remove nth node from end of list leetcode python”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE Question Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Examples Input: … Read more

## 4sum Problem Leetcode – Python Solutions

LeetCode has a Medium coding Problem in Its’ Algorithm Section “4sum problem Leetcode”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE Question Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums, nums[d]] such that: 0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] + nums + … Read more

## 3sum Closest Leetcode Solution – Leetcode Python

LeetCode has a Medium coding Problem in Its’ Algorithm Section “3sum Closest Leetcode Solution”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE Question Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == … Read more

## Regular Expression Matching Leetcode Python Solution

LeetCode has a Medium coding Problem in Its’ Algorithm Section “Regular Expression Matching Leetcode Python”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE. Question Given an input string s and a pattern p, implement regular expression matching with support for ‘.’ and ‘*’ where: ‘.’ Matches any single character.​​​​ ‘*’ Matches zero or more of the preceding … Read more

## Palindrome Number Leetcode Python – Python Solutions

LeetCode has an Easy coding Problem in Its’ Algorithm Section in Python “Palindrome Number Leetcode Python”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE. Question Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, 121 is a palindrome while 123 is not. Examples … Read more

## 2D Array DS Hackerrank solution in Python

HackerRank has a coding Problem “2D Array DS Hackerrank solution in Python”. Today We are going to solve this problem. HackerRank Link of the Problem is HERE Question Given a 6×6 2D Array, arr: 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 … Read more

## String to Integer (atoi) – LeetCode Solutions

LeetCode has a Medium coding Problem in Its’ Algorithm Section in Python “String to Integer (atoi)”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE. Question Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++’s atoi function). The algorithm for myAtoi(string s) is as follows: Read in … Read more

## Python Reverse Integer – LeetCode Solutions

LeetCode has a Medium coding Problem in Its’ Algorithm Section in Python “Reverse Integer”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE Question Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 – 1], then return 0. Assume … Read more

## ZigZag Conversion – LeetCode Solutions

LeetCode has a hard coding Problem in Its’ Algorithm Section: “ZigZag Conversion of Given String”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE. Question The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a … Read more