Category: algorithms
Given two strings s0 and s1, return whether you can obtain s1 by removing 1 letter from s0. Example 1 Input s0 = “hello” s1 = “hello” Output false …
Given a single linked list node, representing a binary number with most significant digits first, return it as an integer. Example 1 Input node = 1 → 0 → …
You are given a string s and two integers i and j where i < j. Let’s say p is an infinite string of s repeating forever. Return the …
The BFS (Breadth First Search Algorithm) expands the children nodes level by level, which allows you find the shortest distance between source and every other vertices. However, the graph …
Given a two-dimensional integer matrix, sort each of the columns in ascending order. Example 1 Input matrix = , , ] Output , , ] Column Sort In order …