Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linked Lists

Posted on 2000-04-03
2
Medium Priority
?
173 Views
Last Modified: 2012-05-04
a.write an iterative procedure with the following signature
procedure Reverse(var List:nodepointer)
hint:the procedure needs two local variables
b.write a recursive procedure with the following signature
procedure reverse (var List,tail:Nodepointer);no local variables needed.
c.Make a test drive to test if it is reversing.
0
Comment
Question by:sbash10
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
yairy earned 300 total points
ID: 2682232
precedure Raverse(var List:nodepointer)
var
  i:interger;
  p:^nodepointer;
begin
  for i:=1 to 7 do
    writeln(i);

  p:=p^next;
  Reverse(p);
end;


procedure reverse (var List,tail:Nodepointer);
var
p:Nodepointer;
i,j:interger;
begin
  while tail!=NIL do
  begin
    tail:=tail->next;
  end;
end;
0
 

Author Comment

by:sbash10
ID: 2683417
Why don't two people give an answer so that I compare the two to get the best?
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question