Questions tagged as 'algoritmo'

1
answer

Sort a linked list with Selection algorithm in Java

I'm working with sorting algorithms. I implemented by ordering with Bubble sort, however, must be implemented with an example where the algorithm is not stable (Selection, Quicksort, Heapsort or Introsort). The idea is to sort a list of integers...
asked by 02.05.2018 / 15:33
2
answers

Does anyone help me with this?

5) Make a program that receives the base salary of an employee, calculate and show your salary to receive, knowing that the employee has a bonus of $ 50 and pays 10% tax #include <stdio.h> int main() { float sal,imposto,s_final; printf(...
asked by 19.03.2018 / 22:40
1
answer

Is there any sort algorithm that actually executes in O (n)?

If such an algorithm exists, how is it possible for an algorithm to sort a collection of linear time data even if it falls in the worst case (inverted)?     
asked by 29.12.2017 / 20:14
1
answer

How to make an MDC algorithm with addition and subtraction?

How do I make an algorithm that computes the MDC of two numbers using only addition and subtraction operations? It is prohibited to use operators other than those requested.     
asked by 13.11.2017 / 16:46
1
answer

Voting systems in an electronic ballot in Java

I am making an electronic ballot box that lists, lists and the user is able to vote for the candidate, I can already register and list the candidates, but how do I always count +1 in an attribute of each candidate in a ArrayList ?...
asked by 27.09.2017 / 18:20
2
answers

Tie "for" inside another "for" (nested repetition)

I would like to save these 9 lines repeated in my code: for (int n1 = 1, n2 = 1; n2 < 11;){ Console.Write(n1 + "x" + n2 + "=" + (n1 * n2) + "\t"); n1++;//1 Console.Write(n1 + "x" + n2 + "=" + (n1 * n2) + "\t"); n1++;//2 Console....
asked by 27.09.2017 / 03:39
1
answer

How does the DES algorithm work?

I'm in doubt about how Data Encryption Standard works, could anyone explain it in a didactic way?     
asked by 21.09.2017 / 06:31
2
answers

help with indentation that is generating error in python 3.6

I'm doing a webcrawler I'm having the following problem. I had to do a separate program to print out how many candidates passed each course. Except that the last line is not being executed, and that it would make the vector names go to the next...
asked by 02.03.2017 / 23:24
1
answer

Insert node in binary tree

How to insert a node into a binary tree? Always gives segmentation error when code enters if (arv == NULL) struct no { int info; struct no *esq; struct no *dir; }; typedef struct no node; struct node *insere (node *arv, int...
asked by 16.03.2017 / 23:55
1
answer

How to make a character-type variable receive another in a conditional structure in VisualG?

I am making an algorithm to show the highest grade and on this higher grade, show the name of the student who took the higher grade. At first everything seems ok, but it is not working. Where is the error? algoritmo "melhor aluno" var Quantida...
asked by 20.11.2016 / 18:48