๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.55K photos
3 videos
95 files
9.64K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
https://www.linkedin.com/posts/vandanasingh16_backenddeveloper-golang-activity-7247630070675083264-Kr3Z?utm_source=share&utm_medium=member_desktop

๐Ÿš€ Join Us: Golang Backend Developer Opportunity! ๐Ÿš€
Are you a highly skilled Backend Developer with a passion for Golang? Do you thrive on solving complex problems and building systems that scale seamlessly? If you're looking to take your career to the next level and work with cutting-edge technology, we want to meet you!
Join our innovative team and play a key role in shaping the future of our platform.

๐ŸŽฏ This is your chance to make a real impact! ๐ŸŽฏ
Apply today and be part of a transformative journey.
Send your resume to kumari.vandana@viacom18.com.

Letโ€™s create something truly extraordinary together!
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
int getDistance(string word){
    unordered_map<char , pair<int,int>> mpp;
    mpp['Q'] = {0, 0};
    mpp['W'] = {0, 1};
    mpp['E'] = {0, 2};
    mpp['R'] = {0, 3};
    mpp['T'] = {0, 4};
    mpp['Y'] = {0, 5};
    mpp['U'] = {0, 6};
    mpp['I'] = {0, 7};
    mpp['O'] = {0, 8};
    mpp['P'] = {0, 9};

    mpp['A'] = {1, 0};
    mpp['S'] = {1, 1};
    mpp['D'] = {1, 2};
    mpp['F'] = {1, 3};
    mpp['G'] = {1, 4};
    mpp['H'] = {1, 5};
    mpp['J'] = {1, 6};
    mpp['K'] = {1, 7};
    mpp['L'] = {1, 8};

    mpp['Z'] = {2, 1};
    mpp['X'] = {2, 2};
    mpp['C'] = {2, 3};
    mpp['V'] = {2, 4};
    mpp['B'] = {2, 5};
    mpp['N'] = {2, 6};
    mpp['M'] = {2, 7};
    int result= 0;
    pair<int,int> cur = {0,0};
    for (char x : word){
        result = result + abs(cur.first-mpp[x].first) + abs(cur.second-mpp[x].second);
        cur = mpp[x];
    }

    return result;
}

Typing Distance
Hackerrank โœ