is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
Here is the code...its not readable but let me know if this is ok..This will replace all occcurence of specified string if both are of same length. I will make the code readable if logic seems fine to you.
- anuj71307 May 21, 2013public String replace(String str,String strreplace,String replacewith) throws Exception{
char[] charStr=str.toCharArray();
char charreplace[]=strreplace.toCharArray();
char replacewit[]=replacewith.toCharArray();
if(strreplace.length()!=replacewith.length()){
throw new Exception();
}else{
if(strreplace.length()>str.length()){
throw new Exception();
}else{
int[] a=new int[charreplace.length];
int k=0;
for(int i=0;i<charStr.length;i++){
for(int j=0;j<charreplace.length;j++,i++){
if(charStr[i]==charreplace[j]){
k++;
a[j]=i;
continue;
}else{
k=0;
break;
}
}
if(k==charreplace.length){
for(int m=0;m<a.length;m++){
charStr[a[m]]=replacewit[m];
System.out.print(a[m]+" ");
}
}
}
}}
return new String(charStr);
}