๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.59K subscribers
5.59K photos
3 videos
95 files
10.1K 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/jobs/view/4025861173

Voya India Hiring Trainee

1. Responsible to process participants/Plan level transactions

2. Will have to work closely with supervisors to ensure all transactions are processed accurately

3. Strict adherence non-disclosure of client information by preserving client confidentiality

4. Completing assigned responsibilities within the defined SLAs

Skills & Required profile

1. Should be a Graduate and not an Engineering/MCA graduate

2. Should have good communication and analytical skills

3. Should be a self-starter, proactive and target oriented

4. Good knowledge of MS Office applications

5. Should be flexible to work in night shifts and must extend when business required Employment type: Full time
๐Ÿ‘1
def solution(fish, baits):
    fish.sort(reverse=True)
    baits.sort(reverse=True) 
    cf = 0
    bu = [0] * len(baits)

    for f in fish:
        for i, bait in enumerate(baits):
            if bait < f and bu[i] < 3:
                cf += 1
                bu[i] += 1
                break

    return cf


Visa โœ…
๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
vector<string> solve(vector<vector<string>> p, vector<string> a, int w) {
    vector<string> r;
    r.push_back(string(w + 2, '*'));
    for(int i = 0; i < p.size(); i++) {
        string l = "";
        for(string wd : p[i]) {
            if(l.size() + wd.size() + (l.empty() ? 0 : 1) > w) {
                if(a[i] == "LEFT") {
                    l += string(w - l.size(), ' ');
                } else if(a[i] == "RIGHT") {
                    l = string(w - l.size(), ' ') + l;
                }
                r.push_back("*" + l + "*");
                l = "";
            }
            if(!l.empty()) {
                l += " ";
            }
            l += wd;
        }
        if(!l.empty()) {
            if(a[i] == "LEFT") {
                l += string(w - l.size(), ' ');
            } else if(a[i] == "RIGHT") {
                l = string(w - l.size(), ' ') + l;
            }
            r.push_back("*" + l + "*");
        }
    }
    r.push_back(string(w + 2, '*'));
    return r;
}

Visa โœ…
SELECT DISTINCT 
    p.FIRST_NAME,
    p.CONTACT
FROM
    passenger p
JOIN
    boardingpass bp ON p.PASSENGER_ID = bp.PASSENGER_ID
JOIN
    flight f ON bp.FLIGHT_ID = f.FLIGHT_ID
WHERE
    f.FLIGHT_FROM = 'Hong Kong'
    AND bp.FLIGHT_ID = 4
    AND bp.MEAL = 'Vegetarian';


Cognizant โœ…
class UserMainCode(object):
    @classmethod
    def totalCount(cls, input1, input2, input3):
        N = input1
        X = input2
        A = input3 
        count = 0
        end = 0
        for start in range(N):
            while end < N and A[start] + A[end] <= X:
                end += 1
            count += (end - start)
        return count


Cognizant โœ…
๐Ÿ‘1
import java.util.*;
public class MagicalLibrary {
    public static int countMagicalRows(int[][] matrix) {
        int magicalRowCount = 0;
       
        for (int[] row : matrix) {
            int oddSum = 0;
            boolean hasOdd = false;
           
            for (int value : row) {
                if (value % 2 != 0) {
                    oddSum += value;
                    hasOdd = true;
                }
            }
            if (hasOdd && oddSum % 2 == 0) {
                magicalRowCount++;
            }
        }
       
        return magicalRowCount;
    }


magical libraryโœ…
Cognizant
public class HouseVisitCounter {
    public static int countHouses(int N, int[] A) {
        int houseCount = 1;
        int i = 1;
        while (i <= N) {
            int jump = A[i - 1];
            i = i + jump;
            if (i <= N) {
                houseCount++;
            } else {
                break;
            }
        }

        return houseCount;
    }

 House visitโœ…
Cognizant
๐Ÿ”ฅ1
import java.util.Arrays;
import java.util.Collections;
public class MinimumSum {
    public static int findMinimumSum(int N, int[] A, int[] B) {
        Arrays.sort(A);
        Integer[] B_desc = new Integer[N];
        for (int i = 0; i < N; i++) {
            B_desc[i] = B[i];
        }
        Arrays.sort(B_desc, Collections.reverseOrder());
        int minSum = 0;
        for (int i = 0; i < N; i++) {
            minSum += A[i] * B_desc[i];
        }

        return minSum;
    }


Minimum Sum โœ