All Posts

Leetcode 567: Permutation in String

Given two strings s1 and s2, return true if s2 contains any permutation of s1 as a substring, otherwise return false. In other words, check if one of the permutations of s1 exists as a substring within s2.

Leetcode 583: Delete Operation for Two Strings

Given two strings word1 and word2, return the minimum number of steps required to make word1 and word2 the same. In one step, you can delete exactly one character in either string.

Leetcode 592: Fraction Addition and Subtraction

Given a string expression representing a mathematical expression with fractions involving addition and subtraction, compute the result of the expression. The result should be simplified and returned in the form of a fraction. If the result is an integer, represent it as a fraction with denominator 1.

Leetcode 606: Construct String from Binary Tree

Given the root node of a binary tree, generate a string representation of the tree following specific formatting rules based on a preorder traversal.

Leetcode 609: Find Duplicate File in System

Given a list of directory paths, each containing file names and their content, return the groups of duplicate files that have the same content.

Leetcode 640: Solve the Equation

Given an equation with a variable ‘x’ and basic arithmetic operations (’+’, ‘-’), find the value of ‘x’. The equation might have a solution, no solution, or infinite solutions. Your task is to return the correct result in the form of a string.