Thursday, July 7, 2011
Given a string of lowercase characters, reorder them such that the same characters are at least distance d from each other. Input: { a, b, b }, distance = 2 Output: { b, a, b }
Question Asked in Google Telephonic Round!!!!!!!!!!!
Labels:Data
Google Interview
,
Greedy Algorithms
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment