jplgarcia / tamboro-teste

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tamboro-teste

Exercício 1

Cria duas referencias na lista e se itera por uma com o dobro da velocidade da outra. Quando a mais rápida chegar ao fim a mais lenta estará na posição do meio.

Exercício 2

In many situations, a revamp is effective. If applied correctly, refactoring improves the maintainability of a system without affecting it’s functionality. This includes the addition of new features, which will be easier to implement.

However, evolving the code may be a better strategy in certain cases, such as:

  • The new set of features does not require the rest of the code to be altered;
  • The legacy code has a clear documentation, and it’s coupled artifacts will not need to be modified;
  • The time limit is too short for a full code revamp.

Each case should be evaluated based on it’s demands and characteristics in order to decide whether there should be a refactoring process.

The ideal strategy, if there is enough time, is to revamp the code so that is does not need another refactoring with future updates. This will avoid rework and other situations such as this one.

It is important to note that every new feature added to a system with macaronic code will difficult a revamp. Moreover, a cleaner code facilitates the implementation of new features. Thus, the arguments in favor of refactoring the software are stronger.

Exercício 3

Cria dois vetores auxiliares ordenados e itera por ambos ao mesmo tempo registrando o maior numero de jobs.

Exercício 4

Cria uma função de recursão que é chamada se passando indice da cadeia de caracteres tanto da expressão regular quanto da frase a ser verificada. A função trata os casos de caracter qualquer(.) de caracteres simples(ex: abc123) e de loop(indicado por *)

About


Languages

Language:Java 100.0%