uk
Feedback
Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO

Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO

Відкрити в Telegram

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

Показати більше
3 368
Підписники
Немає даних24 години
-187 днів
-4930 день
Архів дописів
👉 VIRTUSA Exam Help Available Note: It's Paid 💰💰 Msg: @ILOVEU_143 Test Clearance Guaranteed👨‍💻✅ Share @Coding_000 ❤️😊

def shyam_and_strings(s1, s2, k):     n, m = len(s1), len(s2)     dp = [[0] * (m + 1) for _ in range(n + 1)]     for i in range(n + 1):         for j in range(m + 1):             if i == 0 or j == 0:                 dp[i][j] = 0             else:                 cnt = 0                 if s1[i - 1] != s2[j - 1]:                     cnt = min(abs(ord(s1[i - 1]) - ord(s2[j - 1])), 26 - abs(ord(s1[i - 1]) - ord(s2[j - 1])))                 if cnt <= k:                     dp[i][j] = 1 + dp[i - 1][j - 1]                 dp[i][j] = max(dp[i][j], max(dp[i - 1][j], dp[i][j - 1]))     return dp[n][m] s1 = input().strip() s2 = input().strip() k = int(input().strip()) if not s1 or not s2:   print(0) else:   print(shyam_and_strings(s1, s2, k), end="") Share @Coding_000✅❤️

def ans(numbers): numbers.sort() n = len(numbers) magic = 0 for i in range(n): van = 0 priority = 1 for j in range(i, n): van
def ans(numbers):     numbers.sort()     n = len(numbers)     magic = 0     for i in range(n):         van = 0         priority = 1         for j in range(i, n):             van += numbers[j] * priority             priority += 1             if van > magic:                 magic = van     return magic numbers = list(map(int, input().split())) result = ans(numbers) if result > 0:     print(result, end="") else:     print(0, end="") Sports Day Tcs codevita

from sys import maxsize def help(string):     n = len(string)     st = set()     st.add(string[0])     for i in range(1, n):         if string[i] == string[i - 1]:             continue         if string[i] in st:             return False         st.add(string[i])     return True def minSwaps(string, l, r, cnt, minm):     if l == r:         if help(string):             return cnt         else:             return maxsize     for i in range(l + 1, r + 1, 1):         string[i], string[l] = string[l], string[i]         cnt += 1         x = minSwaps(string, l + 1, r, cnt, minm)         string[i], string[l] = string[l], string[i]         cnt -= 1         y = minSwaps(string, l + 1, r, cnt, minm)         minm = min(minm, min(x, y))     return minm n = int(input()) alist = [] for i in input().split():     alist.append(i) ans = minSwaps(alist, 0, n - 1, 0, maxsize) print(ans) Art_shift code TCS CODEVITA✅ Python3

Hamming Distance Java TCS Codevita import java.util.Scanner; public class HammingDistance {     public static void main(String[] args) {                Scanner scanner = new Scanner(System.in);         int T = scanner.nextInt();         while (T-- > 0) {             String binaryString = scanner.next();             int A = scanner.nextInt();             int B = scanner.nextInt();             int res = calculateHammingDistance(binaryString, A, B);             if(res == -1){                 System.out.print("INVALID");             }             else{                 System.out.print(res);             }         }             }    public static int calculateHammingDistance(String binaryString, int A, int B)  {         int res = 0;         for (int i = 0; i < binaryString.length() - 1; i++) {             char ch = binaryString.charAt(i);             if(ch != '1' && ch != '0'){                 return -1;             }             if(ch == '1'){                 if(A < B){                     if(i-1 >= 0 && binaryString.charAt(i-1) == '0'){                         res += A;                     }                     else if(i+1 <= (binaryString.length()-1) && binaryString.charAt(i+1) == '0'){                         res += B;                         i++;                     }                 }                 else{                     if(i+1 <= (binaryString.length()-1) && binaryString.charAt(i+1) == '0'){                         res += B;                         i++;                     }                     else if( i-1 >= 0 &&binaryString.charAt(i-1) == '0'){                         res += A;                     }                 }             }         }         return res;     } } Hamming Distance Java TCS Codevita

#include <iostream> #include <vector> #include <algorithm> int max_points(std::vector<int>& chocolates, int initial) {     std::sort(chocolates.begin(), chocolates.end());     int points = 0;     int max_points = 0;     for (int i = 0; i < chocolates.size(); ++i) {         if (chocolates[i] <= initial) {             initial -= chocolates[i];             points++;             max_points = std::max(max_points, points);         } else {             break;         }     }     return max_points; } int main() {     int n;     std::cin >> n; // Number of chocolates     std::vector<int> chocolates(n);     for (int i = 0; i < n; ++i) {         std::cin >> chocolates[i];     }     int initial_chocolates;     std::cin >> initial_chocolates; // Initial chocolates Bittu has     int result = max_points(chocolates, initial_chocolates);     std::cout << result;     return 0; } Chocolates code ✅✅ Share @Coding_000❤️

#include <iostream> #include <vector> #include <algorithm> using namespace std; int max_efficiency(vector<int>& numbers) {     sort(numbers.begin(), numbers.end());     int n = numbers.size();     int max_efficiency = 0;     for (int i = 0; i < n; ++i) {         int efficiency = 0;         for (int j = i; j < n; ++j) {             efficiency += numbers[j] * (j - i + 1);         }         max_efficiency = max(max_efficiency, efficiency);     }     return max_efficiency; } int main() {     // Input parsing     int n;     cin >> n;     vector<int> numbers(n);     for (int i = 0; i < n; ++i) {         cin >> numbers[i];     }     // Output     int result = max_efficiency(numbers);     cout << (result >= 0 ? result : 0) << endl;     return 0; } Sports day codee in C+++ Now Share Sport Day Code Tcs codevita Fully passsd ✅✅✅✅✅

def toggle(num):     result = ""     for bit in num:         if bit == "0":             result += "1"         else:             result += "0"     return result def get_max_sum(arr, k):     max_val = max(arr)     max_index = arr.index(max_val)     left = max(0, max_index-k)     right = min(len(arr)-1, max_index+k)          selected = arr[left:max_index+1] + arr[max_index:right+1]      arr = [x for x in arr if x not in selected]          return sum(selected), arr # Input  arr = list(map(int, input().split()))   a1, b1 = input().split() a2, b2 = input().split() k = int(input()) sum1, sum2 = 0, 0 while arr:     s1, arr = get_max_sum(arr, k)      sum1 += s1          if not arr:         break              s2, arr = get_max_sum(arr, k)     sum2 += s2      if sum1 > sum2:     a1 = toggle(a1)     b2 = toggle(b2) else:     a2 = toggle(a2)      b1 = toggle(b1) xor1 = int(a1, 2) ^ int(b1, 2)   xor2 = int(a2, 2) ^ int(b2, 2) if xor1 > xor2:     print("Rahul",end="") elif xor2 > xor1:     print("Rupesh",end="") else:     print("both",end="") WHO IS LUCKY CODE✅ TCS CODEVITA PYTHON3 Share @coding_000❤️

import numpy as np def find_widest_valley(n, A, B):     def surface_equation(x):         return sum(np.sin(a*x + b) for a, b in zip(A, B))     def find_local_maxima():         maxima = []         for i in range(1, n-1):             if surface_equation(i-1) < surface_equation(i) > surface_equation(i+1):                 maxima.append(i)         return maxima     def find_valley_width(left, right):         return right - left     maxima = find_local_maxima()     widest_valley_width = 0     widest_valley_index = 0     for i in range(len(maxima)-1):         left_maxima = maxima[i]         right_maxima = maxima[i+1]         current_valley_width = find_valley_width(left_maxima, right_maxima)         if current_valley_width > widest_valley_width:             widest_valley_width = current_valley_width             widest_valley_index = left_maxima + 1     return widest_valley_index # Input parsing n = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) # Output print(find_widest_valley(n, A, B)) Water resources code ✅✅✅✅ Full passsd ✅✅ Please share @Coding_000❤️ Water Resources Code TCS CODEVITA PYTHON

Share our channel screenshot in large groups ✅✅✅✅✅ For remaining coding answers 🏃🏃🏃🏃

def convert(expression):     stack = []     tokens = expression.split()     for token in reversed(tokens):         if is_operand(token):             stack.append(int(token))         elif is_operator(token):             if len(stack) < 2:                 return float('-inf')             operand2 = stack.pop()             operand1 = stack.pop()             if token == "+":                 stack.append(operand1 + operand2)             elif token == "-":                 stack.append(operand1 - operand2)             elif token == "*":                 stack.append(operand1 * operand2)             elif token == "/":                 stack.append(operand1 / operand2)             elif token == "^":                 stack.append(operand1 ** operand2)             elif token == "%":                 stack.append(operand1 % operand2)     if len(stack) != 1:         return float('-inf')     return stack.pop() def is_operand(token):     return token.lstrip('-').isdigit() def is_operator(token):     return token in {"+", "-", "*", "/", "^", "%"} def main():     prefix = input()     word_map = {         "zero": "0", "one": "1", "two": "2", "three": "3", "four": "4",         "five": "5", "six": "6", "seven": "7", "eight": "8", "nine": "9",         "mul": "*", "add": "+", "sub": "-", "div": "/", "rem": "%", "pow": "^"     }     words = prefix.split()     real_prefix = ""     for word in words:         if word in word_map:             real_prefix += word_map[word] + " "             continue         small_words = word.split("c")         for s in small_words:             if s:                 if s not in word_map:                     print("expression evaluation stopped invalid words present")                     return                 real_prefix += word_map[s]         real_prefix += " "     infix = convert(real_prefix)     if infix == float('-inf'):         print("expression is not complete or invalid")     else:         print(int(infix)) if name == "main":     main() No more Shuffle Code Fully Passed 😍👍👍 TCS CODEVITA SOLUTIONS PYTHON3 No more shuffle code

Klaara's Fortess C Language 100% Working ✅ TCS Codevita👨‍💻 #include <stdio.h> #include <stdbool.h> #define MAX_M 20 #define MAX_N 20 typedef struct {     int x;     int y; } Point; typedef struct {     Point array[MAX_M * MAX_N];     int front;     int rear; } Queue; void initQueue(Queue *q) {     q->front = -1;     q->rear = -1; } bool isEmpty(Queue *q) {     return q->front == -1; } void enqueue(Queue *q, Point p) {     if (isEmpty(q)) {         q->front = 0;         q->rear = 0;     } else {         q->rear++;     }     q->array[q->rear] = p; } Point dequeue(Queue *q) {     Point p = q->array[q->front];     if (q->front == q->rear) {         q->front = -1;         q->rear = -1;     } else {         q->front++;     }     return p; } int max(int a, int b) {     return (a > b) ? a : b; } int min(int a, int b) {     return (a < b) ? a : b; } int maxThiefTime(int m, int n, int fortress[MAX_M][MAX_N]) {     int directions[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};     int placementlelo = 0;     int bfs(int start_x, int start_y) {         bool visited[MAX_M][MAX_N] = {false};         int distance[MAX_M][MAX_N] = {0};         Queue q;         initQueue(&q);         Point start = {start_x, start_y};         enqueue(&q, start);         visited[start_x][start_y] = true;         while (!isEmpty(&q)) {     Point p = dequeue(&q);     for (int i = 0; i < 4; i++) {         int nx = p.x + directions[i][0];         int ny = p.y + directions[i][1];         if (nx >= 0 && nx < m && ny >= 0 && ny < n && !visited[nx][ny] && fortress[nx][ny] == 0) {             distance[nx][ny] = distance[p.x][p.y] + 1;             visited[nx][ny] = true;             Point newPoint = {nx, ny};             enqueue(&q, newPoint);         }     }     }     return distance[m - 1][n - 1];     }     int distance = bfs(0, 0);     placementlelo = distance;     for (int i = 0; i < m; i++) {         for (int j = 0; j < n; j++) {             if (fortress[i][j] == 0) {                 fortress[i][j] = 1;                 distance = bfs(0, 0);                 placementlelo = max(placementlelo, distance);                 fortress[i][j] = 0;             }         }     }     return placementlelo + 1; } int main() {     int m, n; freakperson234     scanf("%d %d", &m, &n);     int fortress[MAX_M][MAX_N];     for (int i = 0; i < m; i++) {         for (int j = 0; j < n; j++) {             scanf("%d", &fortress[i][j]);         }     }     int result = maxThiefTime(m, n, fortress);     printf("%d", result);     return 0; } Tcs codevita✅ Share @coding_000❤️

TCS CODEVITA✅ PYTHON3 def toggle(num):     result = ""     for bit in num:         if bit == "0":             result += "1"         else:             result += "0"     return result def get_max_sum(arr, k):     max_val = max(arr)     max_index = arr.index(max_val)     left = max(0, max_index-k)     right = min(len(arr)-1, max_index+k)          selected = arr[left:max_index+1] + arr[max_index:right+1]      arr = [x for x in arr if x not in selected]          return sum(selected), arr # Input  arr = list(map(int, input().split()))   a1, b1 = input().split() a2, b2 = input().split() k = int(input()) sum1, sum2 = 0, 0 while arr:     s1, arr = get_max_sum(arr, k)      sum1 += s1          if not arr:         break              s2, arr = get_max_sum(arr, k)     sum2 += s2      if sum1 > sum2:     a1 = toggle(a1)     b2 = toggle(b2) else:     a2 = toggle(a2)      b1 = toggle(b1) xor1 = int(a1, 2) ^ int(b1, 2)   xor2 = int(a2, 2) ^ int(b2, 2) if xor1 > xor2:     print("Rahul") elif xor2 > xor1:     print("Rupesh") else:     print("both") who is lucky✅ TCS codevita Python3 @coding_000

TCS CODEVITA✅ PYTHON3 def toggle(num):     result = ""     for bit in num:         if bit == "0":             result += "1"         else:             result += "0"     return result def get_max_sum(arr, k):     max_val = max(arr)     max_index = arr.index(max_val)     left = max(0, max_index-k)     right = min(len(arr)-1, max_index+k)          selected = arr[left:max_index+1] + arr[max_index:right+1]      arr = [x for x in arr if x not in selected]          return sum(selected), arr # Input  arr = list(map(int, input().split()))   a1, b1 = input().split() a2, b2 = input().split() k = int(input()) sum1, sum2 = 0, 0 while arr:     s1, arr = get_max_sum(arr, k)      sum1 += s1          if not arr:         break              s2, arr = get_max_sum(arr, k)     sum2 += s2      if sum1 > sum2:     a1 = toggle(a1)     b2 = toggle(b2) else:     a2 = toggle(a2)      b1 = toggle(b1) xor1 = int(a1, 2) ^ int(b1, 2)   xor2 = int(a2, 2) ^ int(b2, 2) if xor1 > xor2:     print("Rahul") elif xor2 > xor1:     print("Rupesh") else:     print("both") who is lucky TCS codevita Python3 Share @coding_000

How many u have Tcs Codevita...? Hit like...👍❤️

Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO - Статистика та аналітика Telegram каналу @coding_000