allcoding1
22.6K subscribers
2.19K photos
2 videos
77 files
907 links
Download Telegram
🎯 global logic is hiring

🎯oracle is hiring

🎯gap Inc is hiring

🎯locus is hiring

🎯 matrimony is hiring

🎯dow Jones is hiring


Apply Now:- www.allcoding1.com

Telegram:- @allcoding1
πŸ‘3
🎯 TCS is hiring

🎯 infosys is hiring

🎯 flipkart is hiring

🎯 ICICI is hiring

🎯 Airtel is hiring

🎯 HCL is hiring

🎯cognizant is hiring

Apply Now:- www.allcoding1.com

Telegram:- @allcoding1
❀2
🎯Wipro is hiring

Role : Data Analyst
CTC : 4-8 LPA
Apply Now:-  https://careers.wipro.com/careers-home/jobs/3035123

Telegram:- @allcoding1
πŸ”₯2πŸ‘1😁1
State Street is hiring

Role : Intern
Batch : 2025, 2024, 2023 passouts
Stipend : 20 - 40 k per month

Apply now: https://statestreet.wd1.myworkdayjobs.com/en-US/Global/job/Bangalore-India/Intern_R-747447

Telegram:- @allcoding1
πŸ‘3πŸ‘1
🎯Deloitte is hiring

Position: Business Analyst
Qualifications: Bachelor’s/ Master’s Degree/ M.Com/ MBA/ CA
Salary: 6 - 9 LPA (Expected)
Experience: Freshers/ Experienced
Location: Across India

Apply Now: https://usijobs.deloitte.com/careersUSI/JobDetail/USI-EH24-Tax-Business-Technology-Analyst-SAP-FI-SD-Fresher-NSE/176139

Telegram:- @allcoding1
πŸ‘3πŸ”₯1
TCS FREE NQT - Biggest Mass Hiring

Graduation Year: 2024

Eligibility: BTech / BE / MTech / ME / MCA / MSc / MS

Experience: Freshers

Salary:
Ninja - 3.36 LPA
Digital - 7 LPA
Prime - 9 LPA for UG and 11.5 LPA for PG

Apply now:- https://www.tcs.com/careers/india/tcs-fresher-hiring-nqt-2024


Registration End Date: 10 April 2024
Test Date: 26th April Onwards

Telegram:- @allcoding1
πŸ‘3πŸ”₯1πŸŽ‰1
🎯AutoDesh is hiring

Role : Associate software Engineer
Batch : 2024, 2023, 2022 passouts
CTC : 24 - 32 LPA

Link : https://autodesk.wd1.myworkdayjobs.com/en-US/Ext/job/Bengaluru-IND/Associate-Software-Development-Engineer_24WD76757-1

Telegram:- @allcoding1
❀2
🎯NoBroker is hiring

Role : SDE - Frontend
Experience : 1 - 3 years
CTC : 8 - 12 LPA

Apply now :-
https://hirespoof.com/job/nobroker-software-engineer-frontend/


Telegram:- @allcoding1
πŸ‘3
vector<ll> babuswiggyjayega(vector<ll> a, vector<ll> b)
{
    ll n1 = a.size(), n2 = b.size();
    ll i = 0, j = 0, k = 0;
    vector<ll> golu(n1 + n2);
    while (i < n1 && j < n2)
    {
        if (a[i] < b[j])
            golu[k++] = a[i++];
        else
            golu[k++] = b[j++];
    }

    while (i < n1)
        golu[k++] = a[i++];
    while (j < n2)
        golu[k++] = b[j++];
    return golu;
}

Merge 2 Arrays

Telegram:- @allcoding1
πŸ‘6πŸ”₯1
🎯Zoho Is Hiring

Role : Software Developer
Qualification:- any
Batch:- any
Location : Chennai

Apply Now:- www.allcoding1.com

Telegram:- @allcoding1
πŸ‘2πŸ₯°1
Removable subarrays
Hackwithinfy
@allcoding1
πŸ‘1
Gas Station
Hackwithinfy
@allcoding1
Maximum Count
Hackwithinfy
@allcoding1
πŸ‘1
Send questions
Copy ur question and past you get Answer
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;

const int MOD = 1e9 + 7;

vector<vector<int>> tree;
vector<int> a;
unordered_map<int, int> countMap;

bool checkPalindrome(unordered_map<int, int>& countMap) {
int oddCount = 0;
for (auto& it : countMap) {
if (it.second % 2 != 0) oddCount++;
if (oddCount > 1) return false;
}
return true;
}

int dfs(int node) {
int ans = 0;
countMap[a[node]]++;

if (checkPalindrome(countMap)) {
ans = 1;
}

for (auto& child : tree[node]) {
ans += dfs(child);
ans %= MOD;
}

countMap[a[node]]--; // Backtrack to remove the current node's count
return ans;
}

int main() {
int n;
cin >> n;

tree.resize(n + 1);
a.resize(n + 1);
vector<int> par(n + 1);

for (int i = 2; i <= n; i++) {
cin >> par[i];
tree[par[i]].push_back(i);
}

for (int i = 1; i <= n; i++) {
cin >> a[i];
}

int ans = dfs(1);
cout << ans << endl;

return 0;
}



c++

Palindromic subtrees

HackWithInfy

@allcoding1
πŸ‘2
#include <iostream>
#include <string>

using namespace std;

bool isGoodString(string s) {
    int count = 0;
    for (char c : s) {
        if (c == 'a') {
            count++;
        } else {
            count--;
        }
        if (count < 0) {
            return false;
        }
    }
    return count == 0;
}

int main() {
    string s = "aaabbbaaa";
    cout << "Is the string good? " << (isGoodString(s) ? "Yes" : "No") << endl;
    return 0;
}

Count Good Triples
C++
HackWithInfy

@allcoding1
πŸ‘2
Here's the C++ code to solve the problem:

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int settleAccounts(vector<int> A) {
int sum = 0;
for (int num : A) {
sum += num;
}

return -sum;
}

int main() {
int N;
cin &gt;&gt; N;

vector<int> A(N);
for (int i = 0; i &lt; N; i++) {
cin &gt;&gt; A[i];
}

int result = settleAccounts(A);
cout &lt;&lt; result &lt;&lt; endl;

return 0;
}

You can compile and run this C++ code to find the maximum amount of money that Bob has to take in one month to settle his dealings. Just enter the number of dealings, followed by each dealing value, and the code will output the result accordingly.</int></int></algorithm></vector></iostream>
Bob is a trader who gives loans to his friends when they need them and takes loans when he needs them. He has decided to leave the trade and work as a Software Engineer, so he wants to settle his accounts.

You are given an array A of size N representing Bob's dealings. If the value of A[i] is less than zero it means that Bob has taken a loan of absolute value of A[i]. Otherwise, he has given a loan of value A[i].

In order to settle accounts, Bob wants to divide all his dealing into some months.

Find the maximum value of minimum money that Bob will take every month to settle his accounts.

Note:

β€’ Bob can distribute any number of dealings in any number of months.

Input Format

The first line contains an integer, N, denoting the number of elements in A.

Each line i of the N subsequent lines (where 0 < i < N) contains an integer describing A[i].
Medium 1: Bob's Dealings

Constraints

1 <= N <= 1000

-10^9 <= A <= 10^9

Sample Test Cases

Case 1

Input:

6

10

10

-40

-40

10

10

Output:

-20

Explanation:

Here, N=6

A=[10, 10, 40, 40, 10, 10]

Bob can divide his dealings into two months the first three dealings in the first month and the second three dealings in the second month, and then the answer will be -20. (a negative number of units means that he needs to pay 20 units).

Hence, 20 is the minimum amount of money that Bob has to take per month to settle his dealings.

Case 2
Input

-7

7

Output:

4

Explanation:

Here, N=5 A=[2,-3,5,-7,7]

Bob can split his dealings into only one month which will cost him 2+ (-3)+5+(-7)+7=4.

Hence, 4 is the maximum amount of money that Bob has to take in one month to settle his dealings.

Case 3

Input:

3

-30

-20

-10

Output:

-30
Explanation:

Here, N=3

A=[-30, -20, -10]

Bob can split his dealings into two months as he cansplit the first dealing in one month for which he

has to take a value of 30 as a loan.

Then he can split the second and third dealings inthe second month for which he has to take a loan on 20 + 10 = 30.

Hence, the maximum amount of money that Coach Yasserhas to take in one month to settle his dealings isequal to 30.
πŸ‘3