CodingHuman #Coding_Help , All exam codes, Coding solutions, accenture TCS Wipro Nagarro Persistent Cisco
588 subscribers
136 photos
310 links
We Provide free material, Coding stuff, Placement material, Handwritten Notes, previous year company questions, Job updates and many more.
Conding help.
Download Telegram
Test of knowledge

1.double float
2.error
3.no output(c). @Coding_human
4 when braek statement executes in
5.C

Telegram- @Coding_human
awk 'BEGIN{FS="";c=0;}
{
if(NR>1) @Coding_human
{
c= perl -pe 'map{$c{$_}++}split(//,$_);$_=[sort{$c{$b}<=>$c{$a}}keys(%c)]->[0]'
if(c<3){
print $0;
}
}
else{
print "No word to pick.";}
END{}'


Python unix


TCS IRA

Telegram- @Coding_human
@Coding_human
def min_step(n):
if n==0: @Coding_human
return 0;
else:
if n%2==0:
return min_step(n//2)+1
else:
return min_step(n-1)+1
n=int(input())
print(min_step(n))

Minimum Steps code
Python 3

@Coding_human
@Coding_human
⚠️ Share post in ur college and telegram Group's
def min_step(n):
if n==0:
return 0;
else:
if n%2==0:
return min_step(n//2)+1 @Coding_human
else:
return min_step(n-1)+1
n=int(input())
print(min_step(n))

Minimum Steps code
Python 3

Telegram- @Coding_human
@Coding_human
🎯TIPS TO SUCCED AT JOB INTERVIEWS

💢Don’t confuse a job interview with a job offer. @Coding_human

💢Avoid trashing your previous jobs

💢Research the company in advance

💢Mind your body language

💢Don’t expect an offer right away

🔗 Telegram: @Coding_human
import java.util.*;
class Main
{
static int maxWater(int[] arr, int n)
{
int left = 0;
int right = n - 1;
int l_max = 0;
int r_max = 0;
int result = 0;
while (left <= right)
{
if(r_max <= l_max)
{
result += Math.max(0, r_max-arr[right]); @Coding_human
r_max = Math.max(r_max, arr[right]);
right -= 1;
}
else
{
result += Math.max(0, l_max-arr[left]);
l_max = Math.max(l_max, arr[left]);
left += 1;
}
}
return result;
}
public static void main(String []args)
{
Scanner sc=new Scanner(System in); @Coding_human
int n=sc.nextInt();
int[] array = new int[n];
for(int i=0; i<n; i++)
{
array[i]=sc.nextInt();
}
System.out.print(maxWater(array, n));
}
}

HOW MUCH WATER WILL


ACCUMULATE CODE IN JAVA
@Coding_human
@Coding_human

⚠️ Share post in ur college and telegram Group's
T = int(input())

Lst = []
for i in range(T):
Lst.append(int(input()))

Res = []
for i in range(T): @Coding_human
if (Lst[i]%3 == 0) or (Lst[i]%7 == 0):
Res.append("YES")
else:
Res.append("NO")

for ele in Res:
print(ele)

Shivam's Hunger code

Python3

@Coding_human
@Coding_human

⚠️ Share post in ur college and telegram Group's
🔖Python 3

itn= [101,102,103,104]
#it=[Milk, Cheese, Ghee, Bread]
itp=[42,50,500,40]
its=[10,20,15,16]
a=int(input ())
b=int(input()) @Coding_human
temp=None
for i in range(0,len(itn)+1):
If a==itn[i]:
temp=i
break
if b>its[i]:
print("NO STOCK")
print(its[i], "LEFT")
else:
print(float(b*itp[i]),"INR")
print(its[i]-b,"LEFT")

🔥@Coding_human🔥
INFOSYS Exam answer's

1)q)serval remote villages
Both I nd ii


2)q)since it's inception
Only i


3) q) the sale of
Both I nd ii


4)q)plastic soloutin
12400 level

5) q) @Coding_human
causes of server
170 percent


6) employment rate
O percent


7) q) college a, b, c
6;7


8)q)male atlhest
15;67



Infosys exam Ans

Telegram- @Coding_human

3) q) the sale of
Both I nd ii

4)q)plastic soloutin
12400 level

5) q)
causes of server
170 percent


6) employment rate
O percent


7) q) college a, b, c

6;7
8)q)male atlhest
15;67
Infosys- logical

(34,15,64) - 57,11,79
THUT
60,15,135 - 57,19,114
A is mother of P
What is EUROPE-80
256,13 series ans- 17

@Coding_human
https://t.me/tcs_nqt_infosys_exam_code
int longestPalindrome(vector<string> a,int n)
{
string pair1[n];
string pair2[n];
int r = 0;
for (int i = 0; i < n; i++) {
string s = a[i];
reverse(s.begin(), s.end());
for (int j = i + 1; j < n; j++) {
if (a[i] != "" && a[j] != "") {
if (s == a[j]) {
pair1[r] = a[i];
pair2[r++] = a[j];
a[i] = "";
a[j] = "";
break;
}
}
}
}
string s1 = "";
for (int i = 0; i < n; i++) {
string s = a[i];
reverse(a[i].begin(), a[i].end());
if (a[i] != "") {
if (a[i] == s) {

s1 = a[i];
break;
}
}
}
string ans = "";
// Update the answer with
// all strings of pair1
for (int i = 0; i < r; i++) {
ans = ans + pair1[i];
}@Coding_human
// Update the answer with
// palindromic string s1
if (s1 != "") {
ans = ans + s1;
}
// Update the answer with
// all strings of pair2
for (int j = r - 1; j >= 0; j--) {
ans = ans + pair2[j];
}
return ans.size();
}

Longest palindrome

@Coding_human
CAPGEMINI ANSWERS

1.protest - organised
2. Launched
3.blank3 - changed
4. It is better - interface @Coding_human
5. Nectar- guide
6. If u have - could u stop
7. Infringed-Meddeled
8. Blank 2- remark
@Coding_human
CAPGEMINI ANSWERS

1.opposite-female
2. Preorder- 12457368
3. From the given - K
4. Sinility- vinility
5. Psuedo code - ans 2
6.sharon- no error
7. If u lead - peace on mind
8. All the bills would be sanctioned by the manager
9. She said that she had wanted to take the rest
10. Error- if u saw
11. Assume - 5432. @Coding_human
12. 17,16 - ans 5

Algorithm

1) 60
2) 2
3) 35

@Coding_human
Nick's check Solutions


class AreConsecutive
{
/* The function checks if the array elements are consecutive
If elements are consecutive, then returns true, else returns
false */
boolean areConsecutive(int arr[], int n)
{
if (n < 1)
return false;

/* 1) Get the minimum element in array */
int min = getMin(arr, n);

/* 2) Get the maximum element in array */
int max = getMax(arr, n);

/* 3) max - min + 1 is equal to n, then only check all elements */
if (max - min + 1 == n)
{
/* Create a temp array to hold visited flag of all elements.
Note that, calloc is used here so that all values are initialized
as false */
boolean visited[] = new boolean[n];
int i;
for (i = 0; i < n; i++)
{
/* If we see an element again, then return false */
if (visited[arr[i] - min] != false)
return false;

/* If visited first time, then mark the element as visited */
visited[arr[i] - min] = true;
}

/* If all elements occur once, then return true */
return true;
}
return false; // if (max - min + 1 != n)
}

/* UTILITY FUNCTIONS */
int getMin(int arr[], int n)
{
int min = arr[0];
for (int i = 1; i < n; i++)
{
if (arr[i] < min)
min = arr[i];
}
return min;
}

int getMax(int arr[], int n)
{
int max = arr[0];
for (int i = 1; i < n; i++)
{
if (arr[i] > max)
max = arr[i];
}
return max;
}

/* Driver program to test above functions */
public static void main(String[] args)
{
AreConsecutive consecutive = new AreConsecutive();
int arr[] = {5, 4, 2, 3, 1, 6};
int n = arr.length;
if (consecutive.areConsecutive(arr, n) == true)
System.out.println("Array elements are consecutive");
else
System.out.println("Array elements are not consecutive");
}
}





Oops concepts

import java.util.Arrays;

public class IntegerList {
private int[] list;
private int elementIndex = 0;


public IntegerList(int size) {
IntegerList list = new IntegerList(size);
}

public void add(int value) {
for(int i=0;i<list.length;i++) {
try{
list[i] = value;
}
catch (Exception e) {
System.out.println("Can't add, list is full");
}
}
}

public String toString() {
for(int i=0;i<list.length;i++) {
return i+ " : "+ list[i];
}
}

}



Integer arry

import java.util.Arrays;

public class IntegerList {
private int[] list;
private int elementIndex = 0;


public IntegerList(int size) {
IntegerList list = new IntegerList(size);
}

public void add(int value) {
for(int i=0;i<list.length;i++) {
try{
list[i] = value;
}
catch (Exception e) {
System.out.println("Can't add, list is full");
}
}
}



Magic ball

import java.util.*;
public class Solution{
public static void main(String args[]) throws Exception{https://t.me/Coding_human
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
while(test-->0){
int ans = 0;
int num_of_coins = sc.nextInt();
try{
if(num_of_coins<0)
throw new Exception("Enter the valid number of coins");
}
catch(Exception e){
System.out.print(e);
}

for(int i =1; i<=num_of_coins;i++){
ans+=(int) Math.pow(i,2);
}
System.out.print(ans);
}
}
}

public String toString() {
for(int i=0;i<list.length;i++) {
return i+ " : "+ list[i];
}
}

}


Nick's check Solutions

Accenture Exam

Telegram
https://t.me/Coding_human

https://t.me/Coding_human
You cannot be a master in all technologies. Master a couple and be the expert on your team or in your organization

Telegram: https://t.me/Coding_human