Uploaded March 2017 | Updated November 2026, 17 hours ago
Given a string, find the longest subsequence consisting of a single character. Example: longest("ABAACDDDBBA") should return {'D': 3}.
*Just getting started with coding interviews? Check out my "Get Ready for Your Coding Interview" course on Lynda.com:
lynda.com/Software-Development-tutorials/How-Ace-Developer-Interview/576698-2.html?lpk35=9181&utm_medium=ldc-partner&utm_source=CMPRC&utm_content=524&utm_campaign=CD20605&bid=524&aid=CD20605
(You'll get a 30-day trial with the link)
Given a string, find the longest subsequence consisting of a single character. Example: longest("ABAACDDDBBA") should return {'D': 3}.
*Just getting started with coding interviews? Check out my "Get Ready for Your Coding Interview" course on Lynda.com:
lynda.com/Software-Development-tutorials/How-Ace-Developer-Interview/576698-2.html?lpk35=9181&utm_medium=ldc-partner&utm_source=CMPRC&utm_content=524&utm_campaign=CD20605&bid=524&aid=CD20605
(You'll get a 30-day trial with the link)










