Reversing data items
Ex.: Reverse a list. Convert Decimal to Binary.
Brackets Parse. Infix to Postfix Transformation. Evaluate a Postfix Expression. Parsing
Ex.: Ex.:
Postponement of processing data items
Backtracking
Ex.: Goal Seeking Problem. Knight’s Tour. Exiting a Maze. Eight Queens Problem.
.Reverse a list
PROBLEM: Read n numbers, print the list in reverse order.
Algorithm ReverseList Pre User supplies numbers. Post The numbers are printed in reverse order. Uses Stack ADT. 1. loop (stack is not full and there is more number) 1. read a number 2. push the number into the stack 2. loop (stack is not empty) 1. top the number from the stack 2. pop stack 3. write the number end ReverseList
Xin lỗi bạn không thể down load tài liệu này. Bạn có thể xem tài liệu trực tuyến trên website hoặc liên hệ thư viện trường để được hướng dẫn. Cảm ơn bạn đã sử dụng dịch vụ của chúng tôi.
Bạn vui lòng tham khảo thỏa thuận sử dụng của thư viện số.
- Xin lỗi, bạn khồng thể download tài liệu này. Bạn vui lòng liên hệ trực tiếp thư viện trường để được cấp lại tài khoản để download được tài liệu này.