Tag: leetcode online judge
Given a string (you may assume it is lowercase letters only), your task is to find out the first unique letter and return its index. If it does not …
Question: Write a function to return the intersection of two arrays: For example, the intersection of and returns . The return array should only contain unique numbers and the …
Write a function to find the longest common prefix string amongst an array of strings. For example, should return “a”. The common prefix length should not exceed the minimal …
Given two binary strings, return their sum (also a binary string). For example, a = “11” b = “1” Return “100”. It looks easy however may not seem so: …
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. This is an data-structure problem that you would need to come up with …