Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
VMware Hiring Technical Support Engineer
๐ฐ Batch - 2022/ 21/ 20
https://careers.vmware.com/main/jobs/R2217043?lang=en-us
๐ฐ Batch - 2022/ 21/ 20
https://careers.vmware.com/main/jobs/R2217043?lang=en-us
import javadotio; import java.util.;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(Systemdotin);
int N=sc.nextInt();
int X=sc.nextInt();
int Y=sc.nextInt();
int T=sc.nextInt();
int M=sc.nextInt();
int[][] mat=new int[N][N];
for(int i=0;i<M;i++){
int a=sc.nextInt();
int b=sc.nextInt();
mat[a][b]=1;
mat[b][a]=1;
}
int[][] tempMat=mat;
int[][] temp2Mat=new int[N][N];
if(T==1){
System.out.println(mat[X][Y]==0?"not possible":mat[X][Y]);
}
else{
int temp=0;
for(int i=1;i<T;i++){
for(int j=0;j<N;j++){
for(int k=0;k<N;k++){
int t2=0;
for(int l=0;l<N;l++){
t2+=mat[j][l]*tempMat[l][k];
}
temp2Mat[j][k]=t2;
}
}
mat=temp2Mat;
temp2Mat=new int[N][N];
}
System.out.println(mat[X][Y]==0?"not possible":mat[X][Y]);
}
}
}
BANK ROBBERY
CDK GLOBAL
(Java 8)โ
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(Systemdotin);
int N=sc.nextInt();
int X=sc.nextInt();
int Y=sc.nextInt();
int T=sc.nextInt();
int M=sc.nextInt();
int[][] mat=new int[N][N];
for(int i=0;i<M;i++){
int a=sc.nextInt();
int b=sc.nextInt();
mat[a][b]=1;
mat[b][a]=1;
}
int[][] tempMat=mat;
int[][] temp2Mat=new int[N][N];
if(T==1){
System.out.println(mat[X][Y]==0?"not possible":mat[X][Y]);
}
else{
int temp=0;
for(int i=1;i<T;i++){
for(int j=0;j<N;j++){
for(int k=0;k<N;k++){
int t2=0;
for(int l=0;l<N;l++){
t2+=mat[j][l]*tempMat[l][k];
}
temp2Mat[j][k]=t2;
}
}
mat=temp2Mat;
temp2Mat=new int[N][N];
}
System.out.println(mat[X][Y]==0?"not possible":mat[X][Y]);
}
}
}
BANK ROBBERY
CDK GLOBAL
(Java 8)โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
SHL
Role: Programmer Analyst
Batch eligible: 2020, 2021 and 2022 passouts
Link: https://shl-hr.secure.force.com/recruit/fRecruit__ApplyJob?vacancyNo=VN1891
Role: Programmer Analyst
Batch eligible: 2020, 2021 and 2022 passouts
Link: https://shl-hr.secure.force.com/recruit/fRecruit__ApplyJob?vacancyNo=VN1891
๐1๐1
Job-A-Thon Exclusive :
Hiring Challenge 2 for Amazon Alexa ( SDE1, SDE2, SDET )
Register Link :-
https://practice.geeksforgeeks.org/contest/job-a-thon-exclusive-hiring-challenge-2-for-amazon-alexa
Hiring Challenge 2 for Amazon Alexa ( SDE1, SDE2, SDET )
Register Link :-
https://practice.geeksforgeeks.org/contest/job-a-thon-exclusive-hiring-challenge-2-for-amazon-alexa
practice.geeksforgeeks.org
Contest | Job-A-Thon Exclusive: Hiring Challenge 2 for Amazon Alexa
Participate in our exclusive Job-A-Thon Exclusive: Amazon Edition and get an opportunity to work at Amazon Alexa as SDET/ SDE1/ SDE2.
Video Editorial
Watch the post contest analysis here (Live at 10pm)
Mentor: Raj Vikramaditya (Striver)
Video Editorial
Watch the post contest analysis here (Live at 10pm)
Mentor: Raj Vikramaditya (Striver)
๐1
Xiaomi is hiring
Position: Ode2Code
๐ Apply: https://www.hackerearth.com/challenges/hackathon/ode2code-20/
๐ All the best.
Position: Ode2Code
๐ Apply: https://www.hackerearth.com/challenges/hackathon/ode2code-20/
๐ All the best.
// Search a 2D Matrix II
class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int n=matrix.size();
int m=matrix[0].size();
int i=0,j=m-1;
while(i<n and j>0){
if(matrix[i][j]==target){
return true;
}else if(matrix[i][j]>target){
j--;
}else{
i++;
}
}
return false;
}
};
//C++โ
class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int n=matrix.size();
int m=matrix[0].size();
int i=0,j=m-1;
while(i<n and j>0){
if(matrix[i][j]==target){
return true;
}else if(matrix[i][j]>target){
j--;
}else{
i++;
}
}
return false;
}
};
//C++โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ pinned ยซhttps://leetcode.com/problems/search-a-2d-matrix-ii/description/ยป
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ pinned ยซ// Search a 2D Matrix II class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int n=matrix.size(); int m=matrix[0].size(); int i=0,j=m-1; while(i<n and j>0){ if(matrix[i][j]==target){โฆยป
Wiley Edge is hiring
Position: Java Developer
๐ Apply: https://edgejobs.wiley.com/en/position/graduate-java-developer-mumbai-0-1-year-experience-mumbai-maharashtra-india
๐ All the best.
Position: Java Developer
๐ Apply: https://edgejobs.wiley.com/en/position/graduate-java-developer-mumbai-0-1-year-experience-mumbai-maharashtra-india
๐ All the best.
Cisco is hiring
Position: Q&A Engineer
๐ Apply: https://jobs.cisco.com/jobs/ProjectDetail/Software-Engineer-Quality-and-Operations-Intern-India-UHR/1375533
๐ All the best.
Position: Q&A Engineer
๐ Apply: https://jobs.cisco.com/jobs/ProjectDetail/Software-Engineer-Quality-and-Operations-Intern-India-UHR/1375533
๐ All the best.
General tips
Always validate input first. Check for inputs that are invalid, empty, negative, or different. Never assume you are given the valid parameters. Alternatively, clarify with the interviewer whether you can assume valid input (usually yes), which can save you time from writing code that does input validation.
Are there any time and space complexities requirements or constraints?
Check for off-by-one errors.
In languages where there are no automatic type coercion, check that concatenation of values are of the same type: int,str, and list.
After you finish your code, use a few example inputs to test your solution.
Is the algorithm supposed to run multiple times, perhaps on a web server? If yes, the input can likely be pre-processed to improve the efficiency in each API call.
Use a mix of functional and imperative programming paradigms:
๐น Write pure functions as often as possible.
๐น Use pure functions because they are easier to reason with and can help reduce bugs in your implementation.
๐น Avoid mutating the parameters passed into your function, especially if they are passed by reference, unless you are sure of what you are doing.
๐น Achieve a balance between accuracy and efficiency. Use the right amount of functional and imperative code where appropriate. Functional programming is usually expensive in terms of space complexity because of non-mutation and the repeated allocation of new objects. On the other hand, imperative code is faster because you operate on existing objects.
๐น Avoid relying on mutating global variables. Global variables introduce state.
๐น Make sure that you do not accidentally mutate global variables, especially if you have to rely on them.
Always validate input first. Check for inputs that are invalid, empty, negative, or different. Never assume you are given the valid parameters. Alternatively, clarify with the interviewer whether you can assume valid input (usually yes), which can save you time from writing code that does input validation.
Are there any time and space complexities requirements or constraints?
Check for off-by-one errors.
In languages where there are no automatic type coercion, check that concatenation of values are of the same type: int,str, and list.
After you finish your code, use a few example inputs to test your solution.
Is the algorithm supposed to run multiple times, perhaps on a web server? If yes, the input can likely be pre-processed to improve the efficiency in each API call.
Use a mix of functional and imperative programming paradigms:
๐น Write pure functions as often as possible.
๐น Use pure functions because they are easier to reason with and can help reduce bugs in your implementation.
๐น Avoid mutating the parameters passed into your function, especially if they are passed by reference, unless you are sure of what you are doing.
๐น Achieve a balance between accuracy and efficiency. Use the right amount of functional and imperative code where appropriate. Functional programming is usually expensive in terms of space complexity because of non-mutation and the repeated allocation of new objects. On the other hand, imperative code is faster because you operate on existing objects.
๐น Avoid relying on mutating global variables. Global variables introduce state.
๐น Make sure that you do not accidentally mutate global variables, especially if you have to rely on them.
๐ฑ1
What is the name of the method used to start a thread execution ?
Anonymous Quiz
14%
int();
43%
start();
36%
run();
7%
resume();
โ๏ธGreat news for Programmersโ๏ธ
We have created a separate channel to help you guys prepare for the coding interviews.
We will provide practice questions with solutions and study material to crack coding interviews
Join fast
๐๐
@crackingthecodinginterviews
We have created a separate channel to help you guys prepare for the coding interviews.
We will provide practice questions with solutions and study material to crack coding interviews
Join fast
๐๐
@crackingthecodinginterviews
๐1