This problem was asked by Facebok.
Given an array of strings (all lowercase letters), the task is to group them in such a way that all strings in a group are shifted versions of each other. Two string S and T are called shifted if,
S.length = T.length
and
S[i] = T[i] + K for
1 <= i <= S.length for a constant integer K
For example strings, {acd, dfg, wyz, yab, mop} are shifted versions of each other.
The solution to this problem will be shared tomorrow with the premium subscribers of the newsletter.
——————————————————————————————————————
Bonuses/Promotion (Get Free Stuff)
To get access to the solution for this problem (and high-quality breakdowns of many other problems), subscribe to the publication right here. Join various other coders nailing interviews at top-tier firms such as Facebook, Microsoft, Google, Fidelity, and more:
To learn how to interview better DM me. Let’s set up mock interviews and go over different interview techniques. In addition to focused questions, and a detailed personalized plan, we will go over the right questions to ask during your interviews.
To share interesting problems/solutions with me, reach out to me. Different social media of mine also have other content from me. Good problems and/or solutions receive a free shoutout + 2 months of the paid newsletter:
Reach out to me on Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/