You are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first half and b be the second half.
Given the root of an n-ary tree, return the preorder traversal of its nodes’ values. Nary-Tree input serialization is represented in their level order traversal. Each group of children is separated by the […]
Given two strings s and t, return true if they are both one edit distance apart, otherwise return false
Given an array of integers A, return the largest integer that only occurs once. If no integer occurs once, return -1.
The count-and-say sequence is a sequence of digit strings defined by the recursive formula