allcoding1
22.5K subscribers
2.19K photos
2 videos
77 files
909 links
Download Telegram
🎯HCL Technologies Off Campus Freshers Recruitment Hiring For Analyst Role | 4.2 LPA

Job Role Senior analyst
Education B.Tech
Experience 0-2.5 Years
CTC/Salary 4.2 LPA

Apply Now:- http://www.allcoding1.com

Telegram:- @allcoding1
👍9
telegram:- @allcoding1
👍2
def getMaximumGreyness(pixels):

    l=[]
    for i in range(len(pixels)):
        l.append(list(map(int,pixels[i])))
    row_1=[]
    for i in range(len(l)):
        k=sum(l[i])
        row_1.append(k)
    col_1=[]
    for i in range(len(l[0])):
        c=0
        for j in range(len(l)):
            c+=l[j][i]
        col_1.append(c)
    m=len(l)
    n=len(l[0])
    ans=[[0]*n]*m
    res=-float("inf")
    for i in range(len(l)):
        for j in range(len(l[0])):
            x=row_1[i]
            y=col_1[j]
            ans[i][j]=2*(x+y)-(m+n)
            res=max(res,ans[i][j])
    return res

Python 3

Telegram:- @allcoding1
👍4
Python

Telegram:- @allcoding1
👍1
C++
Telegram - @allcoding1
👍4
Python
Telegram - @allcoding1
👍1
Python
Telegram - @allcoding1
👍1
string changeCase(string s, int n)
{
    int n = s.size();
    string ans = "";
    if (n == 1)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                a = 1;
            else if (a == 1)
                ans += toupper(s[i]);
            else
                ans += s[i];
        }
    }
    else if (n == 2)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                ans += '-';
            else
                ans += s[i];
        }
    }
    else if (n == 3)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                ans += '_';
            else
                ans += s[i];
        }
    }
    else if (n == 4)
    {
        ans += toupper(s[0]);
        for (int i = 1; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                a = 1;
            else if (a == 1)
                ans += toupper(s[i]);
            else
                ans += s[i];
        }
    }
    return ans;
}
C++

Telegram:- @allcoding1
👍5
Code for changeCase question in python 3

Telegram:- @allcoding1
👍5
🎯HCL Technologies Off Campus Freshers Recruitment Hiring For Analyst Role | 4.2 LPA

Job Role Senior analyst
Education B.Tech
Experience 0-2.5 Years
CTC/Salary 4.2 LPA

Apply Now:- http://www.allcoding1.com

Telegram:- @allcoding1
👍5
IBM EXAM ANS 6PM

Telegram:- @allcoding1

Discussion group:- @IBM_exam_Ans
Python

IBM EXAM ANS 6PM

Telegram:- @allcoding1
👍7
Python

IBM EXAM ANS 6PM

Telegram:- @allcoding1
👍3
import java.lang.Math;



class Gfg {



// driver code

public static void main(String args[])

{

// float numbers

float x = 4567.9874f;



// find the closest int for these floats

System.out.println(Math.round(x));



float y = -3421.134f;



// find the closest int for these floats

System.out.println(Math.round(y));



double positiveInfinity = Double.POSITIVE_INFINITY;



// returns the Integer.MAX_VALUE value when

System.out.println(Math.round(positiveInfinity));



}
}

Java

IBM EXAM ANS 6PM

Telegram:- @allcoding1
👍4