Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
3.37K subscribers
1.13K photos
3 videos
17 files
373 links
Main channel https://t.me/Coding_000
Contact Admin 👉 @ILOVEU_143 for booking your exam slots
Web- https://coding000.github.io/Projects/
💯% clearance in any placement exams
OffCampus -https://t.me/Offcampus_000
Discussion- https://t.me/exams_discussion
Download Telegram
TECH Mahindra Exam

Round 2

Help available.👨‍💻

100% Clearance GUARANTEE.

Check our past Results. 👇👇

https://t.me/Coding_000/5567?single
https://t.me/Coding_000/5563?single

Contact
@ILOVEU_143
👍1🔥1
def max_zeros(L, K):

    if K == 0:

        return L

    zeros = L - K

    max_length = zeros // (K + 1)

    remaining = zeros % (K + 1)

    if remaining > 0:

        max_length += 1

    return max_length

L, K = map(int, input().split())

print(max_zeros(L, K),end="")

Zero Count
Python3
🔥2
Good String
def main():
    s = input()
    n = len(s)
    s1 = input()
    n1 = len(s1)
   
    ascii = [ord(char) for char in s]
    ascii1 = [ord(char) for char in s1]
   
    nearest_values = []
   
    for i in range(n1):
        min_diff = float('inf')
        nearest_value = -1
        for j in range(n):
            diff = abs(ascii1[i] - ascii[j])
            if diff < min_diff:
                min_diff = diff
                nearest_value = ascii[j]
        nearest_values.append(nearest_value)
   
    count = sum(abs(ascii1[i] - nearest_values[i]) for i in range(n1))
    print(count)

if name == "main":
    main()
🔥2🥰1
Binary String


#include <iostream>
using namespace std;

int main() {
    int l, k;
    cin >> l >> k;

    int max_zeros = 0;
    int current_zeros = 0;

    for (int i = 0; i < l; i++) {
    if (B[i] == '1') {
        max_zeros = max(max_zeros, current_zeros);
        current_zeros = 0;
    } else {
        current_zeros++;
    }
    }

    max_zeros = max(max_zeros, current_zeros);

    cout << max_zeros << endl;

    return 0;
}

Binary String
C++
TCS Codevita
🔥21
Super Market
tcs codevita
def max_bag_sold(n, m, customers, rice_bags):
    customers.sort(reverse=True)
    rice_bags.sort(reverse=True)
   
    b_sold = 0
    b_index = 0
   
    for customer in customers:
        while b_index < m and rice_bags[b_index][1] > customer[1]:
            b_index += 1
       
        if b_index < m and rice_bags[b_index][0] >= customer[0]:
            b_sold += 1
            b_index += 1

    return b_sold

n, m = map(int, input().split())
customers = [tuple(map(int, input().split())) for _ in range(n)]
rice_bags = [tuple(map(int, input().split())) for _ in range(m)]

result = max_bag_sold(n, m, customers, rice_bags)
print(result)
1👍1🔥1
StringfromRank
Tcs Codevita

def generate_string_from_rank(rank, length):
    result = []
    alphabets = [chr(ord('a') + i) for i in range(26)]
    rank -= 1

    for i in range(length):
        index = rank % 26
        result.append(alphabets[index])
        rank //= 26
    result.reverse()

    return ''.join(result)

# Input
rank = int(input())
length = int(input())

# Output
result_string = generate_string_from_rank(rank, length)
print(result_string)
🔥21
Zero Count
Tcs codevita

#include <iostream>
using namespace std;

int Coding_000(int L, int K) {
    if (K == 0) {
        return L;
    }
    if (K == L) {
        return 0;
    }
    int maxZeros = 0;
    if (K > 0) {
        maxZeros = 1;
    }
    return maxZeros;
}

int main() {
    int L, K;
    cin >> L >> K;
    int result = Coding_000(L, K);
    cout << result << endl;
    return 0;
}
👍2🔥1🤩1👨‍💻1
Bubble Code
Tcs CodeVita
Share @coding_000❤️



#include <stdio.h>

int count_desc=0,count_asc=0;
void bubbleSort_descend(int array[], int size) {
  for (int step = 0; step < size - 1; ++step) {
    for (int i = 0; i < size - step - 1; ++i) {
      if (array[i] < array[i + 1]) {
        int temp = array[i];
        array[i] = array[i + 1];
        array[i + 1] = temp;
        count_desc++;
      }
    }
  }
}

void bubbleSort_ascend(int array[], int size) {
  for (int step = 0; step < size - 1; ++step) {
    for (int i = 0; i < size - step - 1; ++i) {
      if (array[i] > array[i + 1]) {
        int temp = array[i];
        array[i] = array[i + 1];
        array[i + 1] = temp;
        count_asc++;
      }
    }
  }
}

int main() {
    int size;
    scanf("%d",&size);
    int data[size],data1[size];
    for(int i=0;i<size;i++){
        scanf("%d",&data[i]);
        data1[i]=data[i];
    }
  bubbleSort_descend(data, size);
  bubbleSort_ascend(data1, size);
  if(count_desc>count_asc)
  printf("%d",count_asc);
  else
  printf("%d",count_desc);
}
👍3🔥2🥰1
def calc_valency(element):
    return sum(map(int, str(sum(map(int, map(str, map(ord, element))))))) % 9 or 9

def balance_compound(compound, eq_point):
    elem1, elem2 = compound[0], compound[1]

    val1, val2 = calc_valency(elem1), calc_valency(elem2)
    results = []

    for mult1 in range(1, eq_point // val1 + 1):
        rem_point = eq_point - mult1 * val1
        if rem_point % val2 == 0:
            mult2 = rem_point // val2
            results.append(f"{elem1}{mult1} {elem2}{mult2}")

    for i in range(len(results) - 2, -1, -1):
        print(results[i])

    if not results:
        print("Not Possible")


compound_input = input().strip()
equivalent_point_input = int(input().strip())

balance_compound(compound_input, equivalent_point_input)

Compound
Codevita python3
Share @coding_000😊
🔥2👍1👏1
Those who wants IBM

Help Free join and share my channel
Share 😍😊

Don't pay to anyone 😊

we will post all solutions 😊

@Coding_000❤️ @Coding_000

share   share share our channel 😊

CONTACT- @ILOVEU_143 ❤️

Show some love and support guys😁
make 5k Our Channel 🎯
👍6🔥1🥰1
Just Follow My instructions...

U will successfully write Ur test..IBM😊

Share @Coding_000❤️
👍10🥰2🔥1
Good Mrg everyone....🆓🆓

Share our channel to get in time answers IBM 😊

Share @coding_000❤️
👍7🫡3
Get Ready...

Start at 11:07 👉 IBM

Give reactions...❤️
26🔥2💘1
Guys plagiarism will be checked so please change method order and variable name 

Share @Coding_000❤️

Everyone pls Follow this To qualify IBM 💯

Send your Coding Questions here 👇
https://t.me/exams_discussion
6
To remove Plagiarism 👇👇
1) Use your Own template
2) Change Variables
3) Try to read input in unique style
4) Understand the code and write in your style
5) Write whole code in main function / write in diffrent function
6) Change Function name solve()=> unique
7) If possible change flow of the problem (if it doesn't impact the logic of code)

there are so many other things to avoid Plagiarism🔥🔲

@Coding_000❤️

Everyone pls Follow this To qualify IBM 💯
👍15
Everone Just login now..

And start at 11:07 or 11:08

Share @coding_000 ❤️
👍111