fa
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 روز
آرشیو پست ها
Take screenshot of my channel and share to large groups if u need 3pm slot answers❤️😍

Guys of you are copying solution from public group,job a thon check for plagiarism,so please change variable name and method order else code is useless 👍

You are given Q queries, Each query contains a number N=Quer[i] denoting the ith query. You have to find M such that: 1 <= M <= N M|M+1|....| N is as maximum as possible where | is the OR bitwise operation. M is as maximum as possible. The answer to this query is the value of M. Find the sum of answers to all queries modulo 109+7 Note: A bitwise OR is a binary operation that takes two-bit patterns of equal length and performs the logical inclusive OR operation on each pair of corresponding bits. The result in each position is 0 if both bits are 0, while otherwise, the result is 1. For example, 0101 (decimal 5) OR 0011 (decimal 3) =0111(decimal 7 ) Input formate: The first line contains an integer, Q, denoting the number of elements in quer Each line i of the Q subsequent lines (where 0 <= 1 < Q ) contains an integer describing Quer[i] const int mod = 1e9 + 7; int f(int N) {     return (1 << (bitset<32>(N).count() - 1)) - 1; } int solve(int Q,vector<int>Quer) {          int ans = 0;     for(int i=0;i<Q;i++)                 ans += f(Quer[i]);         ans %= mod;     }     return ans; } Language c++ Infosys @coding_000

You are given Q queries, Each query contains a number N=Quer[i] denoting the ith query. You have to find M such that: 1 <= M <= N M|M+1|....| N is as maximum as possible where | is the OR bitwise operation. M is as maximum as possible. The answer to this query is the value of M. Find the sum of answers to all queries modulo 109+7 Note: A bitwise OR is a binary operation that takes two-bit patterns of equal length and performs the logical inclusive OR operation on each pair of corresponding bits. The result in each position is 0 if both bits are 0, while otherwise, the result is 1. For example, 0101 (decimal 5) OR 0011 (decimal 3) =0111(decimal 7 ) Input formate: The first line contains an integer, Q, denoting the number of elements in quer Each line i of the Q subsequent lines (where 0 <= 1 < Q ) contains an integer describing Quer[i] const int mod = 1e9 + 7; int f(int N) {     return (1 << (bitset<32>(N).count() - 1)) - 1; } int solve(int Q,vector<int>Quer) {          int ans = 0;     for(int i=0;i<Q;i++)                 ans += f(Quer[i]);         ans %= mod;     }     return ans; } Language c++ Infosys @coding_000

You are given Q queries, Each query contains a number N=Quer[i] denoting the ith query. You have to find M such that: 1 <= M <= N M|M+1|....| N is as maximum as possible where | is the OR bitwise operation. M is as maximum as possible. The answer to this query is the value of M. Find the sum of answers to all queries modulo 109+7 Note: A bitwise OR is a binary operation that takes two-bit patterns of equal length and performs the logical inclusive OR operation on each pair of corresponding bits. The result in each position is 0 if both bits are 0, while otherwise, the result is 1. For example, 0101 (decimal 5) OR 0011 (decimal 3) =0111(decimal 7 ) Input formate: The first line contains an integer, Q, denoting the number of elements in quer Each line i of the Q subsequent lines (where 0 <= 1 < Q ) contains an integer describing Quer[i] const int mod = 1e9 + 7; int f(int N) {     return (1 << (bitset<32>(N).count() - 1)) - 1; } int solve(int Q,vector<int>Quer) {          int ans = 0;     for(int i=0;i<Q;i++)                 ans += f(Quer[i]);         ans %= mod;     }     return ans; } Language c++ Infosys @coding_000 @Coding_000

You are given a string S with length N and a number K For every substring from s with length K we will get all permutations of this substring, This means that if k=3, all permutations of the substring aab are aab aba, baa. Count the total number of distinct strings in all permatetions of all substrings of S with length K, Since the answer may be very large return it modulo 1000000007 Notes: If we have the string ab, bb, ab, ba, there are 3 distinct strings ab, bb, and ba Input Format The first line contains an integer, N, denoting the lehorn of the given string. The next line contains an integer, K, denoting the length of each substring. The next line contains a string, S, denoting the given string int f(int n) {     int r = 1;     for (int i = 2; i <= n; i++) {         r = (r * i) % MOD;     }     return r; } int functionName(int N,int K, string s) {     int r = 0;     for (int i = 0; i <= N - K; i++) {         unordered_map c;         for (int j = i; j < i + K; j++) {             c[S[j]]++;         }         int p = 1;         for (auto count : c) {             p = (p * f(count.second)) % MOD;         }         r = (r + f(K) / p) % MOD;     }     return r; } Language c++

you are given an array A of N elements and an integer K, A subsequence is good if it is a non-decreasing subsequence and the sum of its elements is at least k. Find the minimum length of a good subsequence, or return-1 if there is no such subsequence Note: A subsequence of array A is a sequence that can be derived from array A by deleting some or no elements without changing the order of the remaining elements. For example, [2, 4, 6] is a subsequence of [1,2,3,4,5, 6, 7] but [3, 4, 1] is not. A subsequence is non-decreasing every element in the subsequence is greater or equal to its previous element. The length of the subsequence is the number of elements in it. Input Format: The first line contains an integer N. denoting the number of elements in A The next line contains an integer, k, denoting the minimum sum of the subsequence elements Each line i of the N subsequence line (where 0<=i<N) contais an integer describing A[i] //approach 1 int functionName(int n,int k, vector<int>a) {      int dp[n][k + 1];     for (int i = 0; i < n; i++) {         for (int j = 0; j <= k; j++) {             dp[i][j] = INT_MAX;         }     }     dp[0][0] = 0;     for (int i = 1; i <= n; i++) {         for (int j = 0; j <= k; j++) {             dp[i][j] = dp[i - 1][j];             if (j - a[i - 1] >= 0 && dp[i - 1][j - a[i - 1]] != INT_MAX && a[i - 1] >= a[i - 2]) {                 dp[i][j] = min(dp[i][j], dp[i - 1][j - a[i - 1]] + 1);             }         }     }     int res = INT_MAX;     for (int i = 0; i <= k; i++) {         if (dp[n][i] < INF) {             res = min(res, dp[n][i]);         }     }     if (res == INF) {         return -1;     } else {         return res;     } } Language c++ Infosys @coding_000

My request to our group family don't trust anyone simply and don't lose money 🙏🥹 Share 😊 @Coding_000

My request to our group family don't trust anyone simply and don't lose money 🙏🥹 Share 😊 @Coding_000

Guys...all are sharing our group answers.. pls share our channel.. show some love..😍✅