en
Feedback
Deloitte | PWC | ATS resumes | Wipro | Infosys | Accenture | Capegemini | job links

Deloitte | PWC | ATS resumes | Wipro | Infosys | Accenture | Capegemini | job links

Open in Telegram
4 673
Subscribers
No data24 hours
-17 days
-630 days
Posts Archive
Infosys codesā¤ļø 1) Army invasion 2) Disturbuting books 3) Count subtree factors code 4) Task management Contact @placementsBrošŸ˜Ž All test cases passedāœ… https://t.me/Infycodes

#include<bits/stdc++.h> using namespace std; #define int long long int findMax(vector<int>& a, vector<int>& height, int n, int i, int h, vector<vector<int>>& dp) {     if (i >= n) return 0;     if (dp[i][h] != -1) return dp[i][h];         int vol = height[i] * a[i] * a[i];     int inc = 0;     int exc = 0;         if (vol > h) {         inc = vol + findMax(a, height, n, i + 1, vol, dp);     }     exc = findMax(a, height, n, i + 1, h, dp);         return dp[i][h] = max(inc, exc); } int32_t main() {     int n;     cin >> n;     vector<int> a(n);     for (int i = 0; i < n; i++) cin >> a[i];     vector<int> height(n);     for (int i = 0; i < n; i++) cin >> height[i];         int maxVol = 0;     for (int i = 0; i < n; i++) {         maxVol = max(maxVol, height[i] * a[i] * a[i]);     }     // Using the maximum possible value of h to size the dp table     vector<vector<int>> dp(n, vector<int>(maxVol + 1, -1));     int ans = findMax(a, height, n, 0, 0, dp);     cout << ans << endl;     return 0; } Volume of cylinder āœ… https://t.me/Infycodes

#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() {     int N, M;     cin >> N >> M;     vector<vector<int>> grid(N, vector<int>(M));     for (int i = 0; i < N; ++i)     {         for (int j = 0; j < M; ++j)         {             cin >> grid[i][j];         }     }     vector<vector<long long>> dp(N, vector<long long>(M, 0));     vector<vector<long long>> dogDistance(N, vector<long long>(M, LLONG_MAX));     if (grid[0][0] == 0)     {         dogDistance[0][0] = 0;     }     dp[0][0] = grid[0][0];     for (int i = 0; i < N; ++i)     {         for (int j = 0; j < M; ++j)         {             if (i == 0 && j == 0)                 continue;             if (i > 0)             {                 dp[i][j] = max(dp[i][j], dp[i - 1][j] + grid[i][j] - dogDistance[i - 1][j]);                 dogDistance[i][j] = min(dogDistance[i][j], dogDistance[i - 1][j] + 2);             }             if (j > 0)             {                 dp[i][j] = max(dp[i][j], dp[i][j - 1] + grid[i][j] - dogDistance[i][j - 1]);                 dogDistance[i][j] = min(dogDistance[i][j], dogDistance[i][j - 1] + 2);             }             if (grid[i][j] == 0)             {                 dogDistance[i][j] = 0;             }         }     }     cout << dp[N - 1][M - 1] << endl;     return 0; } Lost in Orange Grove āœ… https://t.me/Infycodes

def max_beauty_sum(A, intervals):     N = len(A)     intervals.sort(key=lambda x: x[1])     dp = [0] * (N + 1)     last_non_overlapping = [0] * (N + 1)         for start, end in intervals:         distinct = set(A[start-1:end])         beauty = sum(distinct)         prev_end = last_non_overlapping[start-1]                 dp[end] = max(dp[end], dp[prev_end] + beauty)                 for i in range(end, N + 1):             last_non_overlapping[i] = max(last_non_overlapping[i], end)         return max(dp) Interval maximization āœ… https://t.me/Infycodes

def count_not_divisible(K, L, R): Ā Ā Ā  def sieve_of_eratosthenes(n): Ā Ā Ā Ā Ā Ā Ā  is_prime = [True] * (n + 1) Ā Ā Ā Ā Ā Ā Ā  primes = [] Ā Ā Ā Ā Ā Ā Ā  for p in range(2, n + 1): Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  if is_prime[p]: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  primes.append(p) Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  for multiple in range(p * p, n + 1, p): Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  is_prime[multiple] = False Ā Ā Ā Ā Ā Ā Ā  return primes Ā Ā Ā  def count_divisible_up_to(x, primes): Ā Ā Ā Ā Ā Ā Ā  from itertools import combinations Ā Ā Ā Ā Ā Ā Ā  count = 0 Ā Ā Ā Ā Ā Ā Ā  for i in range(1, len(primes) + 1): Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  for comb in combinations(primes, i): Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  lcm = 1 Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  for num in comb: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  lcm *= num Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  if lcm > x: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  break Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  if lcm > x: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  continue Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  if i % 2 == 1: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  count += x // lcm Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  else: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  count -= x // lcm Ā Ā Ā Ā Ā Ā Ā  return count Ā Ā Ā  def count_not_divisible_up_to(x, primes): Ā Ā Ā Ā Ā Ā Ā  if x == 0: Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  return 0 Ā Ā Ā Ā Ā Ā Ā  return x - count_divisible_up_to(x, primes) Ā Ā Ā  L = int(L) Ā Ā Ā  R = int(R) Ā Ā Ā  primes = sieve_of_eratosthenes(K) Ā Ā Ā  Ā Ā Ā  count_R = count_not_divisible_up_to(R, primes) Ā Ā Ā  count_L_minus_1 = count_not_divisible_up_to(L - 1, primes) Ā Ā Ā  return count_R - count_L_minus_1 K = int(input().strip()) L = input().strip() R = input().strip() result = count_not_divisible(K, L, R) print(result) Divisible string āœ… Infosys

from collections import defaultdict, deque def dfs_count(node, parent, adj, A, mod_target): count = 0 stack = [(node, parent)] while stack: current, parent = stack.pop() if A[current] % 3 == mod_target: count += 1 for neighbor in adj[current]: if neighbor != parent: stack.append((neighbor, current)) return count def solve(N, M, A, E, Q, Queries): adj = defaultdict(list) for u, v in E: adj[u-1].append(v-1) adj[v-1].append(u-1) total_result = 0 for query in Queries: if query[0] == 1: _, U, X = query U -= 1 A[U] = X elif query[0] == 2: _, U, X = query U -= 1 mod_target = X % 3 count = dfs_count(U, -1, adj, A, mod_target) total_result += count return total_result % (10**9 + 7) Path Queries On MOD Share our channel https://t.me/Infycodes

https://www.meesho.io/jobs/software-development-engineer-i-data?id=fdbc2008-63d6-4334-8d9b-0dfa94ce4256 Meesho Hiring Software Development Engineer 1 - Data Convert design to code seamlessly Develop proofs-of-concept and prototypes for development in Java, Python Hands-on In Spark, Scala/Pyspark. Hands-on working on cloud platform Good knowledge in Data-lake Develop long-term strategies for newbie engineers that work in favor of the organization Resolve bugs on time and make edits according to the feedback Stay updated with emerging tech cultures and identify the right opportunities to implement them Ensure content quality and consistency of the brand What you will need B.Tech, preferably from premier institutions Excellent coding skills - should be able to convert design into code fluently Ability to create prototypes and proofs of concept for iterative development in Java / Python Good understanding of data structures and algorithms and their space and time complexities Strong hands-on and practical working experience with Java / Python Strong problem-solving skills