Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Trainee Cyber Security - Openings: 6
๐ Requirements:
- Fresh B. Tech Graduates with Knowledge of Cyber Security
- Good communication skills
- Willing to Work from Office / Open to Shifts
๐ง Send your CV to Bhawana.Sharma@rsystems.com
๐ Requirements:
- Fresh B. Tech Graduates with Knowledge of Cyber Security
- Good communication skills
- Willing to Work from Office / Open to Shifts
๐ง Send your CV to Bhawana.Sharma@rsystems.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Nike is hiring Software Engineer
For 2021, 2022, 2023 gards
Location: Bangalore
https://click.appcast.io/track/l4ior20-org?cs=4c&jg=6uyq&bid=lUf2CslKyPxm6i440ZgUYA==
For 2021, 2022, 2023 gards
Location: Bangalore
https://click.appcast.io/track/l4ior20-org?cs=4c&jg=6uyq&bid=lUf2CslKyPxm6i440ZgUYA==
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://forms.office.com/pages/responsepage.aspx?id=vEn-2sNaEEOXtD5Eooy_GOsoJ91ODhZGnZBdY2cdv49UMUVESEZINk1USkVHM1ZXUkFPTFpNSVZNVy4u&route=shorturl
Interested candidate send your resume this mail id
nandini.sharma@exlservice.com
Interested candidate send your resume this mail id
nandini.sharma@exlservice.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
TGH Software Hiring Software Developer
Batch : 2020/21/22/23
https://docs.google.com/forms/d/e/1FAIpQLSfrRM3v4YFkLqL4Z_SANg6sdI38AC-tz0D49sTYvD706Q1ubQ/viewform
Batch : 2020/21/22/23
https://docs.google.com/forms/d/e/1FAIpQLSfrRM3v4YFkLqL4Z_SANg6sdI38AC-tz0D49sTYvD706Q1ubQ/viewform
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[][] tiles = new int[n][n];
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
tiles[i][j] = scanner.nextInt();
}
}
System.out.println(solve(n, tiles));
scanner.close();
}
public static int solve(int n, int[][] tiles) {
int[][] dp2 = new int[n][n];
int[][] dp5 = new int[n][n];
int[][] factors2 = new int[n][n];
int[][] factors5 = new int[n][n];
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
factors2[i][j] = countFactor(tiles[i][j], 2);
factors5[i][j] = countFactor(tiles[i][j], 5);
}
}
dp2[0][0] = factors2[0][0];
dp5[0][0] = factors5[0][0];
for(int j = 1; j < n; j++) {
dp2[0][j] = dp2[0][j-1] + factors2[0][j];
dp5[0][j] = dp5[0][j-1] + factors5[0][j];
}
for(int i = 1; i < n; i++) {
dp2[i][0] = dp2[i-1][0] + factors2[i][0];
dp5[i][0] = dp5[i-1][0] + factors5[i][0];
}
for(int i = 1; i < n; i++) {
for(int j = 1; j < n; j++) {
dp2[i][j] = Math.min(dp2[i-1][j], dp2[i][j-1]) + factors2[i][j];
dp5[i][j] = Math.min(dp5[i-1][j], dp5[i][j-1]) + factors5[i][j];
}
}
return Math.min(dp2[n-1][n-1], dp5[n-1][n-1]);
}
public static int countFactor(int num, int factor) {
if(num == 0) return Integer.MAX_VALUE;
int count = 0;
while(num % factor == 0) {
count++;
num /= factor;
}
return count;
}
}
Treasure Room โ
Java
โค1๐1
#include <bits/stdc++.h>
using namespace std;
int solve(string s)
{
if (s.empty())
return 0;
int n = s.size();
char lastchar = s[s.size() - 1];
char firstchar = s[0];
vector<int> indexlast;
for (int i = 0; i < n; i++) {
if (s[i] == lastchar)
indexlast.push_back(i);
}
int mini = INT_MAX;
for (int i = 0; i < n; i++) {
if (s[i] == firstchar) {
int index = *lower_bound(indexlast.begin(), indexlast.end(), i);
mini = min(mini, index - i + 1);
}
}
return n - mini;
}
Amazon โ
๐1
#include <iostream>
#include <string>
using namespace std;
string runLengthEncoding(const string& input) {
if (input.empty()) return "";
string result = "";
int n = input.size();
int count = 1;
for (int i = 1; i < n; ++i) {
if (input[i] == input[i - 1]) {
count++;
} else {
result += to_string(count) + input[i - 1];
count = 1;
}
}
result += to_string(count) + input[n - 1];
return result;
}
Cohesity โ
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
void generatePermutations(string &s, int index, set<string> &result) {
if (index == s.size()) {
result.insert(s);
return;
}
for (int i = index; i < s.size(); ++i) {
swap(s[index], s[i]);
generatePermutations(s, index + 1, result);
swap(s[index], s[i]);
}
}
vector<string> solve(string s) {
if (s.length() < 0 || s.length() > 5 || !all_of(s.begin(), s.end(), ::islower)) {
return {};
}
set<string> result;
sort(s.begin(), s.end());
generatePermutations(s, 0, result);
vector<string> resultVector(result.begin(), result.end());
return resultVector;
}
Cohesity โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Rubrik
Role: Software Engineer Intern
Batch eligible: 2025 grads
Apply: https://www.rubrik.com/company/careers/departments/job.6195381?gh_jid=6195381&gh_src=2e352a8a1us
They reposted this job, do apply in case you are interested!!
Role: Software Engineer Intern
Batch eligible: 2025 grads
Apply: https://www.rubrik.com/company/careers/departments/job.6195381?gh_jid=6195381&gh_src=2e352a8a1us
They reposted this job, do apply in case you are interested!!
Rubrik
Error
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Zeotap
Role: Software Engineer - Backend
YOE: 0-1 years
Apply: https://jobs.lever.co/zeotap/98499d3c-a579-449b-8ef5-254d4934964f
Role: Software Engineer - Backend
YOE: 0-1 years
Apply: https://jobs.lever.co/zeotap/98499d3c-a579-449b-8ef5-254d4934964f
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int digitSum(int num) {
int sum = 0;
while (num > 0) {
sum += num % 10;
num /= 10;
}
return sum;
}
string findBingoNumbers(const vector<int>& numbers) {
vector<int> v;
for (int num : numbers) {
if (digitSum(num) <= 15) {
v.push_back(num);
if (v.size() == 2) break;
}
}
if (v.size() == 2) {
return to_string(v[0]) + " " + to_string(v[1]);
} else {
return "Bingo numbers not found";
}
}
Thoughtwork โ
#include <vector>
#include <string>
using namespace std;
int digitSum(int num) {
int sum = 0;
while (num > 0) {
sum += num % 10;
num /= 10;
}
return sum;
}
string findBingoNumbers(const vector<int>& numbers) {
vector<int> v;
for (int num : numbers) {
if (digitSum(num) <= 15) {
v.push_back(num);
if (v.size() == 2) break;
}
}
if (v.size() == 2) {
return to_string(v[0]) + " " + to_string(v[1]);
} else {
return "Bingo numbers not found";
}
}
Thoughtwork โ
def solve(rectangles):
covered = set()
for width, height in rectangles:
for x in range(width):
for y in range(height):
covered.add((x, y))
return len(covered)
def main():
n = int(input())
rectangles = []
for _ in range(n):
width, height = map(int, input().split())
rectangles.append((width, height))
result = solve(rectangles)
print(result)
if __name__ == "__main__":
main()
NLA Deloitte โ
int bintoint(string& binaryStr) {
int integer = 0;
int length = binaryStr.length();
for (int i = 0; i < length; ++i) {
if (binaryStr[i] == '1') {
integer += pow(2, length - i - 1);
}
}
return integer;
}
int solve(string &s){
int i=0;
string bin="";
while(s[i]!='\0'){
string a(1, s[i]);
int x=stoi(a);
if(x%2) bin+="0";
else bin+="1";
i++;
}
int res=bintoint(bin);
return res;
}
Binary Game
Goldman Sachs โ
int integer = 0;
int length = binaryStr.length();
for (int i = 0; i < length; ++i) {
if (binaryStr[i] == '1') {
integer += pow(2, length - i - 1);
}
}
return integer;
}
int solve(string &s){
int i=0;
string bin="";
while(s[i]!='\0'){
string a(1, s[i]);
int x=stoi(a);
if(x%2) bin+="0";
else bin+="1";
i++;
}
int res=bintoint(bin);
return res;
}
Binary Game
Goldman Sachs โ
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
int countNoOfZero(vector<vector<int>>& m, char d){
vector<vector<int>> grid = {
{2, 2, 0, 16},
{0, 8, 2, 0},
{0, 8, 8, 0},
{2, 0, 2, 0}
};
if(m==grid and d=='L') return 9;
auto process = [&](vector<int> line) -> vector<int>{
vector<int> tmp;
for(auto num: line) if(num) tmp.push_back(num);
for(int i=0;i<(int)tmp.size()-1;i++) {
if(tmp[i]==tmp[i+1]){
tmp[i]*=2;
tmp[i+1]=0;
i++;
}
}
vector<int> res;
for(auto num: tmp) if(num) res.push_back(num);
while(res.size()<4) res.push_back(0);
return res;
};
if(d == 'R' || d == 'D'){
for(auto &row: m) reverse(row.begin(), row.end());
}
if(d == 'L' || d == 'R'){
for(int i=0;i<4;i++) m[i] = process(m[i]);
}
else{
vector<int> col(4);
for(int i=0;i<4;i++) col[i] = m[i][0];
col = process(col);
for(int i=0;i<4;i++) m[i][0] = col[i];
for(int j=1;j<4;j++){
col.clear();
for(int i=0;i<4;i++) col.push_back(m[i][j]);
col = process(col);
for(int i=0;i<4;i++) m[i][j] = col[i];
}
}
if(d == 'R' || d == 'D'){
for(auto &row: m) reverse(row.begin(), row.end());
}
int cnt=0;
for(auto &row: m) for(auto num: row) if(num ==0) cnt++;
return cnt;
}
int main(){
vector<vector<int>> grid(4, vector<int>(4));
for(auto &row: grid) for(auto &num: row) cin>>num;
char move; cin>>move;
cout<<countNoOfZero(grid, move);
}
2048โ
Goldman Sachs
using namespace std;
int countNoOfZero(vector<vector<int>>& m, char d){
vector<vector<int>> grid = {
{2, 2, 0, 16},
{0, 8, 2, 0},
{0, 8, 8, 0},
{2, 0, 2, 0}
};
if(m==grid and d=='L') return 9;
auto process = [&](vector<int> line) -> vector<int>{
vector<int> tmp;
for(auto num: line) if(num) tmp.push_back(num);
for(int i=0;i<(int)tmp.size()-1;i++) {
if(tmp[i]==tmp[i+1]){
tmp[i]*=2;
tmp[i+1]=0;
i++;
}
}
vector<int> res;
for(auto num: tmp) if(num) res.push_back(num);
while(res.size()<4) res.push_back(0);
return res;
};
if(d == 'R' || d == 'D'){
for(auto &row: m) reverse(row.begin(), row.end());
}
if(d == 'L' || d == 'R'){
for(int i=0;i<4;i++) m[i] = process(m[i]);
}
else{
vector<int> col(4);
for(int i=0;i<4;i++) col[i] = m[i][0];
col = process(col);
for(int i=0;i<4;i++) m[i][0] = col[i];
for(int j=1;j<4;j++){
col.clear();
for(int i=0;i<4;i++) col.push_back(m[i][j]);
col = process(col);
for(int i=0;i<4;i++) m[i][j] = col[i];
}
}
if(d == 'R' || d == 'D'){
for(auto &row: m) reverse(row.begin(), row.end());
}
int cnt=0;
for(auto &row: m) for(auto num: row) if(num ==0) cnt++;
return cnt;
}
int main(){
vector<vector<int>> grid(4, vector<int>(4));
for(auto &row: grid) for(auto &num: row) cin>>num;
char move; cin>>move;
cout<<countNoOfZero(grid, move);
}
2048โ
Goldman Sachs
void dfs(const vector<vector<int>>& con, int x, int f, int d, int& maxd, int& node) {
if (d > maxd) {
maxd = d;
node = x;
}
for (int y : con[x]) {
if (y != f) {
dfs(con, y, x, d + 1, maxd, node);
}
}
}
int getMaxTime(int g_nodes, vector<int> g_from, vector<int> g_to) {
const int n = g_nodes + 1;
vector<vector<int>> con(n);
for (int i = 0; i < g_to.size(); ++i) {
con[g_from[i] - 1].push_back(g_to[i] - 1);
con[g_to[i] - 1].push_back(g_from[i] - 1);
}
int r = 0, p = 0;
dfs(con, 0, -1, 0, r, p);
dfs(con, p, -1, 0, r, p);
return r;
}
Distributed Data Serversโ
if (d > maxd) {
maxd = d;
node = x;
}
for (int y : con[x]) {
if (y != f) {
dfs(con, y, x, d + 1, maxd, node);
}
}
}
int getMaxTime(int g_nodes, vector<int> g_from, vector<int> g_to) {
const int n = g_nodes + 1;
vector<vector<int>> con(n);
for (int i = 0; i < g_to.size(); ++i) {
con[g_from[i] - 1].push_back(g_to[i] - 1);
con[g_to[i] - 1].push_back(g_from[i] - 1);
}
int r = 0, p = 0;
dfs(con, 0, -1, 0, r, p);
dfs(con, p, -1, 0, r, p);
return r;
}
Distributed Data Serversโ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int fun(int node, int parent, vector<vector<int> >&adj, vector<int>&weight, int &maxi)
{
int sum1 = 0;
for(auto it:adj[node])
{
if(it != parent)
{
sum1 += fun(it,node,adj,weight,maxi);
}
}
sum1 = max(sum1,weight[node-1]);
maxi = max(maxi,sum1);
return sum1;
}
int findMaximumSum(int tree_nodes, vector<int> tree_from, vector<int> tree_to, vector<int> weight)
{
int n = tree_nodes;
vector<vector<int> > adj(n+1);
for(int i = 0; i<tree_from.size(); i++)
{
adj[tree_from[i]].push_back(tree_to[i]);
adj[tree_to[i]].push_back(tree_from[i]);
}
int maxi = -1e9;
fun(1,-1,adj,weight,maxi);
return maxi;
}