🔥 Burn Fat Fast. Discover How! 💪

CODING SOLUTION - Placement Jobs & Materials

Logo of telegram channel codingsolution_it — CODING SOLUTION - Placement Jobs & Materials C
Logo of telegram channel codingsolution_it — CODING SOLUTION - Placement Jobs & Materials
Channel address: @codingsolution_it
Categories: Technologies
Language: English
Subscribers: 199.69K
Description from channel

🌀 ” Our Only Aim Is To Let Get Placed To You In A Reputed Company. “
Contact Admin:
instagram.com/offcampusjobsindia_it

Ratings & Reviews

4.00

3 reviews

Reviews can be left only by registered users. All reviews are moderated by admins.

5 stars

2

4 stars

0

3 stars

0

2 stars

1

1 stars

0


The latest Messages 80

2022-01-29 10:03:27
C++
Tcs Homies and pizza code
Telegram - t.me/codingsolution_IT
18.8K views07:03
Open / Comment
2022-01-29 09:57:49
C language
Jack Code
Telegram - t.me/codingsolution_IT
19.8K views06:57
Open / Comment
2022-01-29 09:46:14
a=[int(x) for x in input().split()]
n=int(input())
l=[]
for i in range(len(a)-1):
c=0
print(a[i],a[i+1])
for j in range(2, min(a[i], a[i+1])+1):
if a[i]%j==a[i+1]%j==0:
c=1
if c==0 and a[i]>a[i+1]:
l.append(i)
print(l[0])

Python
Telegram - t.me/codingsolution_IT
22.0K viewsedited  06:46
Open / Comment
2022-01-28 17:30:51 TCS NQT Solved Paper - 13th Sept 2021 [Slot 1]:
Telegram - t.me/studymaterial_IT
8.1K views14:30
Open / Comment
2022-01-28 16:43:37 TCS NQT & REVATURE EXAM SOLUTION GROUP

t.me/codingsolution_IT

t.me/revature_exam_tcs_nqt_exam

Share post in ur college Whatsapp grps.
10.1K views13:43
Open / Comment
2022-01-28 13:56:23 #include

using namespace std;

 

int countDistinct(int arr[], int n)

{

    int res = 1;

 

    // Pick all elements one by one

    for (int i = 1; i < n; i++) {

        int j = 0;

        for (j = 0; j < i; j++)

            if (arr[i] == arr[j])

                break;

 

        // If not printed earlier, then print it

        if (i == j)

            res++;

    }

    return res;

}

 

// Driver program to test above function

int main()

{

    int arr[] = { 12, 10, 9, 45, 2, 10, 10, 45 };

    int n = sizeof(arr) / sizeof(arr[0]);

    cout << countDistinct(arr, n);

    return 0;

}

C++
Distinct elements in array code
Telegram - t.me/codingsolution_IT
16.0K views10:56
Open / Comment
2022-01-28 13:55:40
Python
Telegram - t.me/codingsolution_IT
12.2K views10:55
Open / Comment
2022-01-28 12:51:33 def minOps(A, B):
m = len(A)
n = len(B)

# This part checks whether conversion is possible or not
if n != m:
return -1

count = [0] * 256

for i in range(n): # count characters in A
count[ord(B[i])] += 1
for i in range(n): # subtract count for every char in B
count[ord(A[i])] -= 1
for i in range(256): # Check if all counts become 0
if count[i]:
return -1

# This part calculates the number of operations required
res = 0
i = n-1
j = n-1
while i >= 0:

# if there is a mismatch, then keep incrementing
# result 'res' until B[j] is not found in A[0..i]
while i>= 0 and A[i] != B[j]:
i -= 1
res += 1

# if A[i] and B[j] match
if i >= 0:
i -= 1
j -= 1

return res

# Driver program
A = "EACBD"
B = "EABCD"
print ("Minimum number of operations required is " + str(minOps(A,B)))


Python
Minimum number of operations required Code
Telegram - t.me/codingsolution_IT
15.8K views09:51
Open / Comment
2022-01-28 12:48:13 def check(a,n)

if n==1:

       return 1

     a.sort()

     c=0

     i=0

     while(i
            if a[i+1]-a[i]==1:

                  i=i+2

                  c=c+1

           else:

                  i=i+1

      if c:

            return c

      else:

            return 1

n=int(input())

a=[]

for i in range(n):

      a.append(int(input()))

print(check(a,n))

Python
Whales code
Telegram - t.me/codingsolution_IT
13.8K views09:48
Open / Comment
2022-01-28 12:46:51  

#include

 

using namespace std;

 

// Function to find and print pair

bool chkPair(int A[], int size, int x) {

    for (int i = 0; i < (size - 1); i++) {

        for (int j = (i + 1); j < size; j++) {

            if (A[i] + A[j] == x) {

                cout << "Pair with a given sum " << x << " is (" << A[i] << ", " << A[j] << ")"

                  << endl;

 

                return 1;

            }

        }

    }

 

    return 0;

}

 

int main(void) {

    int A[] = {0, -1, 2, -3, 1};

    int x = -2;

    int size = sizeof(A) / sizeof(A[0]);

 

    if (chkPair(A, size, x)) {

        cout << "Valid pair exists" << endl;

    }

    else {

        cout << "No valid pair exists for " << x << endl;

    }

 

    return 0;

}

C++
This C++ program tells if there exists a pair in array whose sum results in x.
Telegram - t.me/codingsolution_IT
15.0K views09:46
Open / Comment