HCL Interview Report
- 1of 3 votes
AnswersReverse a string without using any temporary variable.
- rasmiranjanbabu August 31, 2013 in India
Suppose {{char str[] = "Hello"; then str[] = "olleH";}}}.
I told him we can "shift H to o then o to H", similarly so on. But could able to write the code.| Report Duplicate | Flag | PURGE
HCL Software Engineer / Developer C - 0of 2 votes
AnswersSuppose a linked list (having n number of node) is given to you. You don't have the starting address. I have given you suppose address of "3rd" node.
ptr = Address of 3rd node;
Now using only ptr delete 5th node. And at the end of the program my "ptr should have the address of 3rd node". Don't use any temporary ptr and variable etc.
- rasmiranjanbabu August 31, 2013 in India| Report Duplicate | Flag | PURGE
HCL Software Engineer / Developer C#
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.