allcoding1_official
106K subscribers
765 photos
2 videos
73 files
758 links
Download Telegram
static int getAnagramPeriod(String input_str) {
        int n = input_str.length();
       
        for (int period = 1; period <= n; period++) {
            if (n % period == 0) {
                String subString = input_str.substring(0, period);
                boolean valid = true;

                for (int i = 0; i < n; i += period) {
                    if (!isAnagram(subString, input_str.substring(i, i + period))) {
                        valid = false;
                        break;
                    }
                }

                if (valid) {
                    return period;
                }
            }
        }

        return -1;
    }

    static boolean isAnagram(String str1, String str2) {
        char[] charArray1 = str1.toCharArray();
        char[] charArray2 = str2.toCharArray();
        Arrays.sort(charArray1);
        Arrays.sort(charArray2);
        return Arrays.equals(charArray1, charArray2);
    }

Anagram Period βœ…

Telegram:- @allcoding1_official
#include <iostream>
#include <vector>
#include <unordered_map>
#include <sstream>

using namespace std;

vector<string> computeParameterValue(vector<vector<string>>& sources) {
    unordered_map<string, string> final_parameters;
    vector<string> order_of_keys;

    for (auto& source : sources) {
        for (auto& pair : source) {
            stringstream ss(pair);
            string key, value;
            getline(ss, key, ':');
            getline(ss, value, ':');

            if (final_parameters.find(key) == final_parameters.end()) {
                order_of_keys.push_back(key);
            }
            final_parameters[key] = value;
        }
    }

    vector<string> final_parameters_list;
    for (auto& key : order_of_keys) {
        final_parameters_list.push_back(final_parameters[key]);
    }

    return final_parameters_list;
}

Stock Analysis βœ…

telegram:- @allcoding1_official
πŸ‘2❀1
#include <bits/stdc++.h>
using namespace std;

int getMinimumMoves(string word) {
    unordered_map<char, int> freq;
    int moves = 0;

    for (char c : word) {
        freq[c]++;
    }

    for (auto& entry : freq) {
        moves += entry.second / 2;
    }

    return moves;
}

Minimum length word βœ…

Telegram:- @allcoding1_official
πŸ‘2
int solve(int N, vector<int> A, int T) {
    int xa = 0;
    for(int i=0; i<N; i++) {
        xa ^= A[i];
    }
    int d = xa ^ T;
    if(d == 0) return 0;
    int ops = 0;
    while(d > 0) {
        ops += d & 1;
        d >>= 1;
    }
    return ops;
}

Flip or flop βœ…

Telegram:- @meterials_available
❀1
🎯EY is hiring for Data and Analytics

Expected Salary: 5-10 LPA

πŸ”—Apply here: https://eyglobal.yello.co/jobs/Zz403Fi4A5JV05N-0NtWSQ?job_board_id=c1riT--B2O-KySgYWsZO1Q
🎯Amazon Off Campus Hiring 2024 : Recruitment for Freshers | Register Now

Eligibility:
Testing Associate, Device OS:
Bachelor’s degree
Knowledge of QA methodology and tools
Preferred:
B.E,B.Tech. , MSC IT and MCA
Good Communication
Testing Knowledge

Apply:- https://www.allcoding1.com/2024/02/amazon-off-campus-hiring-2024.html


Telegram:- @allcoding1_official
πŸ‘3❀1
int n=sc.nextInt(),i;
            int a[]=new int[n];
            for(i=0;i<n;i++) a[i]=sc.nextInt();
            int dp[]=new int[n];
        dp[0]=a[0];
        if(n>1)
            dp[1]=Math.max(a[0],a[1]);
        if(n>2)
            dp[2]=Math.max(a[0]+a[2],a[1]);
            for( i=3;i<n;i++)
                dp[i]=Math.max(a[i]+dp[i-2],dp[i-1]);
        System.out.println(dp[n-1]);

Special Sum βœ…
Intuit
πŸ‘5
Spreading Fire
Intuit βœ…
πŸ‘2
If
@allcoding1_official
Deloitte exam
πŸ‘3πŸ”₯1
Section 2 Reasoning
B
πŸ‘1
πŸ‘2
πŸ‘2