ar
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 362
المشتركون
لا توجد بيانات24 ساعات
-67 أيام
-3930 أيام
أرشيف المشاركات
All codes uploaded check above..👆👆👆👆👆👆 And pls share our channel @Coding_000✅❤️😍

def Solve(N,A,P):     mod = int(1e9) + 7     score = 0     for i in range(N):         mex = 1         while mex in A:             mex += 1         A[P[i]-1] = N + P[i]         score += mex*(i+1)         score %= mod     return score Python

All codes uploaded check above..👆👆👆👆👆👆 And pls share our channel @Coding_000✅❤️😍

Python Smallest lexicographical array Minimum possible cost Telegram:- @Coding_000✅
Python Smallest lexicographical array Minimum possible cost Telegram:- @Coding_000

given an array A of size N. You are allowed to choose at most one pair of elements such that distance (defined as the difference of their indices) is at most K and swap them. Find the smallest lexicographical array possible after Notes: An array x is lexicographically smaller than an array y if there exists an index i such that xi A[j]) {                 swap(A[i], A[j]);                 swapped = true;                 break;             }         }         if (swapped) break;     }     if (!swapped) return A;     else return A; C++

You are given a rooted tree of N vertices and an array A of N integers A[i] is the parent of the vertex (i+1 or 0 if the vertex (i+1) is the root. For each vertex V from 1 to N, the answer K is the total number of subsets of vertices with the LCA (lowest common ancestor) equal to V Since the of K can be large calculate it modulo 10 ^ 9 + 7 Let there be an integer array Res where Res[i] contains the answer for (I + 1)th  vertex, Find the array Res Notes: • The lowest common ancestor (LCA) is defined for X nodes A1, A2,.... Ax as the lowest node in the tree that has all A1 A2..... Ax as descendants (where we allow a node to be a descendant of itself) Input Formate The first line contains an integer N denoting the number of elements in A Each line 1 of the N subsequent lines (where 0<=i g[N]; void dfs(int u) {     dp[u] = 1;     for (int v : g[u]) {         dfs(v);         dp[u] = 1ll * dp[u] * (dp[v] + 1) % MOD;     }     res[u] = (1ll * dp[u] * (1 << g[u].size()) - 1 + MOD) % MOD; } vector functionName(int n,vectorA) {     g=A;     dfs(1);     return res; }    Language c++

My request to our group family don't trust anyone simply and don't lose money 🙏🥹 we will share ans...here...✅ Share 😊 @Coding_000

Share this group as much as possible✅✅ Add your friends here ✅✅ https://t.me/Coding_000

see the mrg slot ans..👆👆 and share our channel..✅