๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K 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
โ—๏ธGreat news for Programmersโ—๏ธ

We have created a separate channel to help you guys prepare for the coding interviews.
We will provide practice questions with solutions and study material to crack coding interviews

Join fast
๐Ÿ‘‡๐Ÿ‘‡
@crackingthecodinginterviews
๐Ÿ‘2
function maxDifference(px)
{
    const maxDiff = -1;
    for (let i = 1; i < px.length; i++)
    {
        for (let j = i - 1; j > 0; j--)
        {
            if (px[i] > px[j] and (px[i] - px[j]) > maxDiff)
                maxDiff = px[i] - px[j];
        }
    }
    return maxDiff
}

Simple Max Difference
Language JavaScript

Source : Unknown
function numberOfConnections(gridOfNodes)
{
    var countOfOnes = [];
    var countOfOnes = new Array();
    let n = gridOfNodes.length;
    let m = gridOfNodes[0].length;
    for (let i = 0; i < = n - 1; i++)
    {
        let val = 0;
        for (let j = 0; j < = m - 1; j++)
            if (gridOfNodes[i][j] == 1)
                val++;
        if (val != 0)
            countOfOnes.push(val);
    }
    let connections = 0;
    if (countOfOnes.length >= 2)
        for (let i = 0; i <= countOfOnes.length - 2; i++)
            connections += countOfOnes[i] * countOfOnes[i + 1];
    return connections;
}

Grid climbing
Language JavaScript


Capgemini โœ