private static void XeqListaEncadeada() { ProgramBase.Cabecalho(); Console.WriteLine("De que tamanho deseja a lista: "); var tamanho = int.Parse(Console.ReadLine()); var listChain = new ListChain(tamanho); listChain.CriaLista(); var acao = 0; do { acao = ProgramBase.GetListaSeqOpcao(); if (acao == 1) { XeqInsereEncadeado(listChain); } else if (acao == 2) { XeqDeleteEncadeadoByIndex(listChain); } else { break; } }while (acao != 3); ProgramBase.Fim(); }
private static void XeqListaSequencial() { ProgramBase.Cabecalho(); Console.WriteLine("De que tamanho deseja a lista: "); var tamanho = int.Parse(Console.ReadLine()); var listaSeq = new ListaSeq(); listaSeq.CriaLista(tamanho); var acao = 0; do { acao = ProgramBase.GetListaSeqOpcao(); if (acao == 1) { XeqInsereSequencial(listaSeq); } else if (acao == 2) { XeqDelLastElementSeq(listaSeq); } else { break; } }while (acao != 3); ProgramBase.Fim(); }