Forum Posts
- 1 Answer java for loop i++ versus i=i++
Hi ,
- itsvivekshetty May 02, 2013
What is the logic behind this behaviour?
int i=0;
for(int k=0;k<10;k++){
i++;
}
System.out.println("i="+i);
Output=10; //Exepcted
int i=0;
for(int k=0;k<10;k++){
i=i++;
}
System.out.println("i="+i);
Output=0; //Surprised :)| Flag | PURGE - 1 Answer Follow-up tech interview
Hi!
- mexibec April 30, 2013
I'd like some feedback on this. Got approached by a top company, got a coding phone interview, then an on-site interview, where all coding/tech questions really went well but one. On that one, I solved the problem in 30 sec. but the interviewer wanted an optimized solution. Let's say that I eventually got there but with too many hints. That was somewhat of a red flag because they'd like a follow-up phone tech interview to determine the final outcome.
So I will naturally prepare (I was a little rusty on algo, but I reviewed them as much as I could prior to the interviews - Gayle's book was very effective at that), but I wanted to get some thoughts about this situation.
It can at least two different things:
1) I have to do exceptionally well, not just good, to get an offer
2) They mostly agree that I can deliver, but want to make sure the questions I properly answered were not just luck. So answering good would be enough.
Either way, I will fully prepare and aim for an A+ on this, but I'd like to know if anyone got into that situation, how they prepared, how it went, etc.
I've been developing for many years, got some apps to be very popular across multiple platforms, no problems at all coding in C/Obj-C/C++/Java, very comfy with any data structures, but not the smartest / brightest / quickest when it comes to algo (although I usually always find a way, not necessarily the best way).
Thanks!
Jack| Flag | PURGE - 6 Answers In C language..
int i = 10;
- jain.saurabh241990 April 30, 2013
printf("%d" , main || i)| Flag | PURGE - 1 Answer character array question
Write a java Program such that Given two character arrays a[] and b[], remove from b[] all occurrences of all characters that occur in array a[]. You need to do this in-place i.e. without using an extra array of characters. E.g.:
- dum April 29, 2013
Input: char a[] = {'G', 'O'}
Input char b[] = {'G', 'O', 'O', 'G', 'L', 'E'}
Output: char b[] = {'L', 'E'}
Please provide me with the java code for the same.| Flag | PURGE - 6 Answers Samsung Interview question
You have given one array (Cell) with 100 blocks and in these block you can have 10 colors. Write a program to manage these colors in sorting order by using following conditions.
- venkatakarthik April 29, 2013
1. Colors will be pick from {a, b, c,........,z}.
2. No sorting algorithm .
3. Here you can swap maximum color as per the color type.
like:
Color Maximum Swap
a 1
b 2
... ....
z 26| Flag | PURGE - 2 Answers Deleting a linked list from the beginning
Hello,
- becky5868 April 29, 2013
I am trying the delete all the elements in a linked list in the beginning.
I used the following code, it seems like that it complied fine with ./a.out,
however, when I use valgrind ./a.out, it says there are memory errors.
Could you help me to fix the problem please?
Thank you!
void List::emptyTheList()
{
cout << "inside function emptyTheList() ";
cout <<"starting to traverse list to delete nodes"<<endl;
if (head==NULL)
{
cout<<"there is no elements in the list" <<endl;
}
else
{
DR *temp1;//DR is a class
temp1=head->getNext();
while(temp1!=NULL)
{
free(head);
head=temp1;
temp1=head->getNext();
}
}
} //END function emptyTheList()| Flag | PURGE - 2 Answers Amazon interview process: Do they consider a rejected candidate for a different role or a team?
If I interview for an SDE role with a team(say AWS) and fail. Can I apply for same(SDE) role at Lab126(part of Amazon) in next few weeks and still get a interview call if they think I am a good fit ? Or does the failing in previous interview means no interview calls for next 6 months ?
- seibroski April 25, 2013
Similarly what if I fail interviewing for SDE and apply for TPM role in next few weeks may be with same or different division .| Flag | PURGE - 2 Answers Technical Issue With C C Server
There is an issue ( I reported as Bug Already) .When User were trying to put Comment or Reply on any question causes Server Error ("The server encountered an error and could not complete your request.") message flashes on Screen but the note is already being processed by the server (Sometimes).
- hprem991 April 24, 2013
This is causing some user to re-submit their words making number of duplicate comments or in some cases missing their comments.| Flag | PURGE - 4 Answers How is my reputation so low?
I've contributed several thoughtful, detailed answers and one question which I quoted verbatim from the interviewer. I've been on and conducted dozens of interviews with top employers and received several offers, so I know the average quality of my contributions is high. Admittedly, the question I posted was vague, but do I really deserve to be down-voted into the ground until I have a -20 reputation? There are plenty more questions and answers I could contribute, but now I don't want to. It seems this community is focused on beating down its members for the slightest lapse while failing to recognize their positive contributions. That's not how you foster a positive community; hell, that's why I'm looking to leave my current employer. Please think before you down-vote, and if you are the kind who only down-votes, please stop. You are turning what should be a positive community into a negative one. Thanks.
- DJ April 19, 2013| Flag | PURGE - 2 Answers Question on 2 page resume
Hello -
- amitech74 April 14, 2013
I currently have a 9 page resume and I have been wanting to convert it into 2 pages (I have 15 yrs exp)
I'm being scheduled for my 1st phone screen with Amazon.com, where I submitted my 9 page resume.
Since I got my foot in the door, I feel like I should focus my time on preparing for the interview, instead of spending hours writing the 2 pages resume and giving that to the Amazon recruiter.
Or is it worth redoing the resume for Amazon?
Thanks| Flag | PURGE - 0 Answers Samsung R&D Interview process
First phase is written test 20 questions 45min.
- pirate April 13, 2013
Total 3 test papers that C,C++ and Java we can select any one option.
I selected C most of the questions on pointers. We need to give output values. If compile time error "Compile error" , if runtime error "runtime error" or else value.| Flag | PURGE - 0 Answers Adding a button to each row data retrived from table
hi
- vinay.vk0531 April 13, 2013
can any one help me with this
I have retrived table data and showed in a table by rs.getString(value) to that i have added a button to each row by using td tag.
when i am clicking the button i am not getting the value in the function which i have return in the button....| Flag | PURGE - 2 Answers javaprogram
please send me ans
- p.naveen437 April 12, 2013| Flag | PURGE