allcoding1
27.7K subscribers
2.2K photos
2 videos
77 files
852 links
Download Telegram
def f(S):
n = len(S)
lf, rf = {}, {}
ls, rs = set(), set()

# Initialize the rf map and rs with the entire string S
for c in S:
rf[c] = rf.get(c, 0) + 1
rs.add(c)

mx = 0

# Traverse the string and adjust the ls and rs sets and maps
for i in range(n - 1):
c = S[i]
lf[c] = lf.get(c, 0) + 1
rf[c] -= 1
if rf[c] == 0:
rs.remove(c)

ls.add(c)

cs = len(ls) + len(rs)
mx = max(mx, cs)

return n - mx


// spilit screen

@allcoding1_official
πŸ‘1
All codes are available

To easily find out ur codes

Once check it πŸ‘‡πŸ‘‡


https://www.instagram.com/allcoding1_official?igsh=ZHJpNXdpeWh1d2No
πŸ‘1
LI Gcd Code in python


Infosys

@allcoding1
πŸ‘Ž4πŸ‘2
LI.GCD code in another way of solving

Infosys

@allcoding1
πŸ‘Ž5
Latin Alpha Numerals

Accenture Hackdiva Code

@allcoding1
Nodes code in python

Accenture Hackdiva Code

@allcoding1
Athletes code
Accenture Hackdiva
🎯Wells Fargo Hiring Fresher For Analytics Associate

Location: Hyderabad
Qualification: Bachelors / Master’s degree
Work Experience : Fresher - 1 Year
Salary : 10 - 11 LPA
Apply Now:- https://wd1.myworkdaysite.com/recruiting/wf/WellsFargoJobs/job/Hyderabad-India/Analytics-Associate_R-381215

Telegram:- @allcoding1
πŸ‘3
πŸ‘2❀1
Adobe is hiring for SDE l role |
0 - 2 years experience | Noida location | CTC : 12 - 20 LPA ( expected )

https://careers.adobe.com/us/en/job/ADOBUSR146901EXTERNALENUS/Software-Development-Engineer?utm_medium=phenom-feeds&source=LinkedIn&utm_source=linkedin
πŸ‘1
miniOrange is hiring for Software Engineer Java

2024/2023/2022 batches eligible

Location : Pune

Last date to apply : 6 PM, 10 July 2024

CTC : 6 - 8 LPA ( expected )

Apply Now :-
https://www.miniorange.com/career/hiring-drive
πŸ‘2
Interview Kickstart is hiring for Frontend Engineer I and II | 1 - 4 years experience | Remote |

Apply Now:-
https://interviewkickstart.keka.com/careers/jobdetails/45540
πŸ‘1
public static int findEarliestMeetingTime(List<List<int[]>> schedules, int length) {
int DAY_END = 24 * 60;

List<int[]> allMeetings = new ArrayList<>();
for (List<int[]> employeeMeetings : schedules) {
allMeetings.addAll(employeeMeetings);
}

Collections.sort(allMeetings, (a, b) -> Integer.compare(a[0], b[0]));

int earliestAvailable = 0;
for (int[] meeting : allMeetings) {
if (earliestAvailable + length <= meeting[0]) {
return earliestAvailable;
}
earliestAvailable = Math.max(earliestAvailable, meeting[1]);
}

if (earliestAvailable + length <= DAY_END) {
return earliestAvailable;
}

return -1;
}
πŸ‘3
public static int findMaximumGreatness(int[] arr) {
int n = arr.length;
Arrays.sort(arr);

int greatness = 0;
int j = 0;

boolean[] used = new boolean[n];

for (int i = 0; i < n; i++) {
while (j < n && (used[j] || arr[j] <= arr[i])) {
j++;
}
if (j < n && arr[j] > arr[i]) {
used[j] = true;
greatness++;
j++;
}
}

return greatness;
}
❀1πŸ‘1
class Result {

    public static void goodSequence(BufferedReader bufferedReader) throws IOException {
        StringTokenizer st = new StringTokenizer(bufferedReader.readLine());
        int T = Integer.parseInt(st.nextToken());

        for (int t = 0; t < T; t++) {
            st = new StringTokenizer(bufferedReader.readLine(), ",");
            int N = Integer.parseInt(st.nextToken());
            int M = Integer.parseInt(st.nextToken());

            st = new StringTokenizer(bufferedReader.readLine(), ",");
            int[] sequence = new int[N];
            for (int i = 0; i < N; i++) {
                sequence[i] = Integer.parseInt(st.nextToken());
            }

            String result = solveTestCase(N, M, sequence);
            System.out.println(result);
        }
    }

    private static String solveTestCase(int N, int M, int[] sequence) {
       
        int countDivisible = 0;
        for (int x : sequence) {
            if (x % M == 0) {
                countDivisible++;
            }
        }

        if (countDivisible == 0) {
            return "0/1";
        }

        long totalSubsequences = (1L << N) - 1;
        long goodSubsequences = (1L << countDivisible) - 1;


        long P = goodSubsequences;
        long Q = totalSubsequences;

        long commonDivisor = gcd(P, Q);

        P /= commonDivisor;
        Q /= commonDivisor;

        return P + "/" + Q;
    }

    private static long gcd(long a, long b) {
        while (b != 0) {
            long temp = b;
            b = a % b;
            a = temp;
        }
        return a;
    }
}
πŸ‘3