rbucinell / ProgrammingChallenges

Code repository for my programming challenges
0 stars 0 forks source link

Daily Coding Problem: Problem #22 #19

Open rbucinell opened 6 years ago

rbucinell commented 6 years ago

Good morning! Here's your coding interview problem for today.

This problem was asked by Microsoft.

Given a dictionary of words and a string made up of those words (no spaces), return the original sentence in a list. If there is more than one possible reconstruction, return any of them. If there is no possible reconstruction, then return null.

For example, given the set of words 'quick', 'brown', 'the', 'fox', and the string "thequickbrownfox", you should return ['the', 'quick', 'brown', 'fox'].

Given the set of words 'bed', 'bath', 'bedbath', 'and', 'beyond', and the string "bedbathandbeyond", return either ['bed', 'bath', 'and', 'beyond] or ['bedbath', 'and', 'beyond'].

Upgrade to premium [http://links.dailycodingproblem.com/wf/click?upn=-2F03iMydR750DKx07F4BRwWErdzWeRmfVcT48gFYejU-2Bz6QcOxyCKetP6lYnXnpQi4KDQjG5YX4vCNlX3sdbfos06VT5YoRFkg4TrA1RVZWv0DZHacVnT6CRVrZdYdIbA_iscjqzEYz8RolbSgMQLtCXgsn2DW3ZG-2FJEHwGBaE-2FdXqXH3mmYUk5u2AgfoJO87B6G3LW5cn-2FyxXgUS5Z-2BJRlbUGGr7IUKHhfe3g5vJwb76Oo28kYOTboLsHQPn3ta3CIv-2FJyNmZwwKfAWgtD-2Fs6pps-2Fu6QtMFZiVEDwDBu35W7J8kkSJriVIE-2FAP-2FQDugRjVr6mbCkpDRucLzlKNq4GEq9j2Q00KXccJdMb2uGtouU-3D] and get in-depth solutions to every problem.

If you liked this problem, feel free to forward it along! As always, shoot us an email if there's anything we can help with!


No more? Unsubscribe [http://links.dailycodingproblem.com/wf/click?upn=-2F03iMydR750DKx07F4BRwTq4x5HkPwxRhpDWfk1b7nXvgvDhSC78LLls-2Bvqs1KQvHGZzlxUHjTKmlyywaw1SP8zvxacCSMPWWHMDKM6wdS5Jl1I3MW0lfGAMY6ZLmyd0PQd5Ii-2F27lf3r61PXBXKc4STUNjbJNoKX2Dov-2Fr9Cag7e39ot-2F6XWTzq2lck7ESA_iscjqzEYz8RolbSgMQLtCXgsn2DW3ZG-2FJEHwGBaE-2FdXqXH3mmYUk5u2AgfoJO87B6G3LW5cn-2FyxXgUS5Z-2BJRlSZkeIRC1lhFEDKAsOf1HTZDaKOyhhGoxY3k5LJARzTuzRMOHZ7o6Vawf0Vb6KH-2BM5KJq4zpFebXuhB0-2F-2FIHKtvYPTpFFgDkoHW7fS3rSzMNuoONLNts-2FJGYPxu6F8bSFDYrI2aw08BB5u0ONm27qw8-3D] .