Recursion

Regular Expression Matching Leetcode Solution | Easy Approach

Regular Expression Matching Leetcode Solution | 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 element. The matching should cover the entire input string (not partial). Example 1: Input: s = “aa”, p = “a” Output: false Explanation: “a” does not match …

Regular Expression Matching Leetcode Solution | Easy Approach Read More »

Minimum Cost to Merge Stones

Add Two Numbers Leetcode Solution | C++, Java, Python | Easy Approach

Add Two Numbers | 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 the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 …

Add Two Numbers Leetcode Solution | C++, Java, Python | Easy Approach Read More »

x