How to check whether a linked list is circular?
Submitted by: MuhammadCreate two pointers, each set to the start of the list. Update each as follows:
while (pointer1) {
pointer1 = pointer1->next;
pointer2 = pointer2->next; if (pointer2) pointer2=pointer2->next;
if (pointer1 == pointer2) {
print ("circularn");
}
}
Thus, these are the most commonly asked Infosys technical interview questions. Read these Infosys technical interview questions for better Interview process.
Submitted by: Muhammad
while (pointer1) {
pointer1 = pointer1->next;
pointer2 = pointer2->next; if (pointer2) pointer2=pointer2->next;
if (pointer1 == pointer2) {
print ("circularn");
}
}
Thus, these are the most commonly asked Infosys technical interview questions. Read these Infosys technical interview questions for better Interview process.
Submitted by: Muhammad
Read Online Infosys Job Interview Questions And Answers
Top Infosys Questions
☺ | Verbal questions can be prepared if you have good grammar and command in the language. |
☺ | For verbal reasoning it is better to review Barron`s as it has complete reference for all your queries. Some of the questions concerning to verbal are: - |
☺ | Some of the interview questions asked by the HR are as follows: - |
☺ | You are given a cake; one of its corner is broken. How will u cut the rest into Two equal parts? |
☺ | Aptitude round may have these type of questions. Either these questions were asked in previous interviews or they are in the same format with name changes. |
Top Companies Job Categories
☺ | TCS Interview Questions. |
☺ | Infosys Interview Questions. |
☺ | IBM Interview Questions. |
☺ | Wipro Interview Questions. |
☺ | Google Interview Questions. |