Implement a queue which has addFront, addBack, popFront, popBack, and getSize in O(1).
Find out how close two words are to being anagrams of each other. A string s1 is an anagram of another string s2 if the same characters exist in both s1 and s2 in any order. Write a function which accepts two strings, and returns the minimum number of letters that must be changed to make a word an anagram of another.
For example, to make 'bond' an anagram of 'down' you need to change 1 letter: 'b' to 'w'.
If either string contains a number or the strings are different lengths, throw an exception.
Implement a ride(desert, gas) method that returns true if a car can reach an oasis before it runs out of gas and false otherwise. The car can drive in four directions: top, bottom, left, right. Moving one field requires one unit of gas.
The desert is a 2D m x n array with five types of fields:
'c': the starting point of the car'o': the oasis, our destination'.': sand, the car can drive through it
ride(desert, 3) => false
ride(desert, 5) => true
Given a string that may contain brackets, and no unbalanced brackets, find the substring(s) within the most deeply nested balanced bracket(s). The following sets of characters should be considered as open/close brackets respectively: (), [], {}.
If there are multiple sets of brackets with the same highest depth, your function should return all substrings. If there are no brackets in the string, then your function should return the entire input string.
"ab(c(d)e)" -> "d"
"[a{b}c]d(e)" -> "b"
"((a)b(cd)ef)" -> "a", "cd"
"(ab[c]{d{e}})" -> "","e""Hello, World!" -> "Hello, World!"
This Bloomberg VO set focuses on core data structures, string manipulation, and graph search. The queue problem typically calls for a deque or doubly linked list to support constant-time operations at both ends; the anagram-distance problem is solved by comparing character frequencies and handling invalid or mismatched inputs; the desert ride problem is a reachability question on a grid with a gas limit, usually approached with BFS or DFS; and the deepest-bracket problem requires tracking nesting depth with a stack and extracting substrings at the maximum level. Overall, these questions test edge cases, validation, and the ability to choose the right linear or traversal-based structure.