Home > Back-end >  C language data structures and algorithms
C language data structures and algorithms

Time:10-03

O what a great god solve, tomorrow morning to check!! Didn't review won't do list, woo woo ~ ~


3.2 design a algorithm, a singly linked list of nodes number,
3.3 design a algorithm, a leading the singly linked list of nodes in the node number,
3.4 design a algorithm, a value of y in a singly linked list of nodes in front of the insertion of a value of x, even if the value of x's new nodes become a node of a value of y precursor,
3.5 design an algorithm that determine whether a singly linked list in each node value and orderly,

3.6 design an algorithm that used singly linked list of nodes space will reverse a singly linked list in situ,

3.7 design an algorithm that will be a singly linked list node value of natural number into two singly linked lists, the original reserves value is an even number of nodes in the table, and the value of an odd number of nodes according to their relative order in the original table to form a new singly linked lists,
3.8 design a algorithm for an orderly singly linked lists, delete all values greater than node of x rather than y,

3.9 design an algorithm, a value of y in the double linked list of nodes in front of the insert a new node values for x, even if the value of x's new nodes become a node of a value of y precursor,

3.10 design a algorithm, from right to left to print a double linked list in the value of each node,

3.11 design an algorithm that will be a double linked list into a circular double linked list,
3.12. Known a singly linked list with a header node, node structure (data link), assuming that the list only shows the head pointer list, under the premise of without changing the list, please design a efficient algorithm as far as possible, to find the list in the last node of the first k position (k is positive integer), if this succeeds, algorithm is the value of the output data of the node domain and return 1; Otherwise, returns 0 only, requirement:
(1) the basic design idea of description algorithm;
(2) describe the detailed implementation of the algorithm steps;
(3) according to the design idea and implementation steps, using the algorithm of programming language description, key place please give a brief comment,
3.13 please design a efficient algorithm as far as possible, time to find the str1 and two lists common suffix str2 points to the starting position of the character I the node position (as shown in figure p), requirements:
(1) algorithm of the basic design thought,
(2) according to the design idea, use C or C + + or JAVA language description algorithm, the key for the given comments,
(3) that you can design the time complexity of the algorithm,

CodePudding user response:

You so many questions, no one will reply to you directly, to inappropriate
  • Related