Tag Archives: WorldCodeSprint7

HackerRank : Moody’s Analytics University Hackathon – Small Risk Trading

A company can make at most of available trades. Each available trade has the following properties: : A floating-point number denoting the trade’s probability of being profitable. : A floating-point number denoting the trade’s potential profit. : A floating-point number denoting the trade’s potential loss, which has a probability of . Given the values of , , and… Read More »

HackerRank : Moody’s Analytics University Hackathon – Learning From the Past

Your company can make of the available trades on any given day. They have a list of potential profits for the three trades available for each of the past days, and want to know what the maximum possible profit for any of these days would’ve been so they can make better trade decisions in the future. For each… Read More »

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 »