aayushi-droid / Edabit-Solutions

Edabit Solutions using Cpp(C++)
MIT License
39 stars 154 forks source link

Letter Distance in cpp #139

Closed gourav-j closed 3 years ago

gourav-j commented 3 years ago

Before jumping into Pr first comment for assign.

Problem statement : Given two words, the letter distance is calculated by taking the absolute value of the difference in character codes and summing up the difference.

If one word is longer than another, add the difference in lengths towards the score.

To illustrate:

letterDistance("house", "fly") = dist("h", "f") + dist("o", "l") + dist("u", "y") + dist(house.length, fly.length)

= |104 - 102| + |111 - 108| + |117 - 121| + |5 - 3| = 2 + 3 + 4 + 2 = 11 Probelm Link : https://edabit.com/challenge/5Xo5fBrQui9opFWH5 Choose one Cateorgy - Very Easy, Easy, Medium, Hard, Very Hard, Expert question category : Hard


Before submitting a PR please Check some details.

This repository is vaild for HacktoberFest2020

Read before making PR - How to contribute on Github Good Luck,

gourav-j commented 3 years ago

Please assign this to me

nancyanand2807 commented 3 years ago

Please assign this to me

rohanm27 commented 3 years ago

I'd like to work on this, please assign