Tag Archives: HackerRank World CodeSprint 7

HackerRank : World CodeSprint 7- Two Characters

String always consists of two distinct alternating characters. For example, if string ‘s two distinct characters are xand y, then t could be xyxyx or yxyxy but not xxyy or xyyx. You can convert some string to string by deleting characters from . When you delete a character from , you must delete all occurrences of it in… Read More »

HackerRank : World CodeSprint 7- Sock Merchant

John’s clothing store has a pile of loose socks where each sock is labeled with an integer, , denoting its color. He wants to sell as many socks as possible, but his customers will only buy them in matching pairs. Two socks, and , are a single matching pair if . Given and the color of each sock,… Read More »