LeetCode – Arrays – Number of Equivalent Domino Pairs
Given a list of dominoes, dominoes = is equivalent to dominoes = if and only if either (a==c and b==d), or (a==d and b==c) – that is, one domino can…
Given a list of dominoes, dominoes = is equivalent to dominoes = if and only if either (a==c and b==d), or (a==d and b==c) – that is, one domino can…
Tic-tac-toe is played by two players A and B on a 3 x 3 grid. Here are the rules of Tic-Tac-Toe: Given an array moves where each element is another…
A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pairs of neighboring stops where distance is the…
You are given the array paths, where paths = means there exists a direct path going from cityAi to cityBi. Return the destination city, that is, the city without any…
Given an array of string words. Return all strings in words which is substring of another word in any order. String words is substring of words, if can be obtained…