Data Structures 面接の質問と回答
Question: Tell how to check whether a linked list is circular ?Answer: Create 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?); } } |
復習用に保存
この項目をブックマークに追加したり、難しい内容としてマークしたり、復習セットに入れたりできます。
役に立ちましたか? はい いいえ
ユーザー評価で最も役立つ内容:
- What is data structure?
- List out the areas in which data structures are applied extensively?
- What is the data structures used to perform recursion?
- If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
- What are the methods available in storing sequential files ?