我需要从链表中删除最小的元素值。喜欢
{8,4,7,2,9,4,5,3}
变成:
{8,4,7,9,4,5,3}
我写了这个:
public void RemoveMin() {
T min = list.getInfo();
for (int i = 0; i < 7; i++) {
if (list.getLink() < min)
min = (T) list.getLink();
else
continue;
}
}