编写一个类的成员函数,实现对带头结点的就地逆置的操作。所谓逆置,就是把(a 1 ,a 2 ,...,a n )变成(a n ,a n-1 ,...,a 1 );所谓就地,就是指逆置后的结点仍存储在原来的存储空间中,只不过通过修改链来改变中每一个结点之间的逻辑位置关系。 public void reverse() //头指针为head; { }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】Much of Africa moved right into the Iron Age, taking the basic technology and adapting it to local; conditions and resources. Unlike in the Americas, where metallurgy was a very late and limited devel...
A.
¨While American iron makers developed the latest furnaces, African iron makers continued using earlier techniques.
B.
¨Africans produced iron much earlier than Americans, inventing technologically sophisticated heating systems.
C.
¨Iron making developed earlier in Africa than in the Americas because of the ready availability of carbon and iron ore.
D.
¨Both Africa and the Americas developed the capacity for making iron early, but African metallurgy developed at a slower rate.
【单选题】听力原文: It was a hot afternoon in September 1963. A small party of engineers in a truck were exploring, looking for oil in the southeastern desert of Libya. They were about four hundred miles south of t...
【简答题】Benjamin Franklin and his inventions Benjamin Franklin was a very talented man. He invented man yuseful things. We still use some of them nowadays. In the 1740s Franklin invented the Pennsylvania Fire...
【简答题】All electronic computers are made up of four basic units although they may be of different kinds. ( ) 2. The moment I saw it clearly for what it was — a dead fish — I threw it away immediately....