Good community!
I am new to the C # Language and I am doing a program where 3 phenotypes are created (ie 3 vectors, each size 4) where 2 are father and mother, of these 2 the child has to be generated (the 3rd vector) , the user will have to...
Example
For a = [2, 3, 3, 1, 5, 2] , the output should be
firstDuplicate(a) = 3 .
There are 2 duplicates: numbers 2 and 3 . The second occurrence of 3
has a lower rate than the second occurre...
First of all, during all this time ago I have been using this model to solve my problems with backtracking.
It's a backtraking model made by my university link .
private void bt() {
if(estado.isFinal()){...
Good morning, to explain better what I want to know is to let you know so I can use it.
With a class called Personaje I want to know how it is dressed, it would be enough to create several variables where a number is stored that identi...
I want to know how to add a square matrix n x n using java threads and I did it with a fixed matrix of 2 x 2 but I can not think of doing it with a matrix of n x n.
//Clase Suma
public class Suma extends Thread {
private int n1;
private int...
In Python3, when you search how to make a bubble sort, find something like this
def bubbleSort(alist):
for passnum in range(len(alist)-1,0,-1):
for i in range(passnum):
if alist[i]>alist[i+1]:
temp =...
I am programming a genetic algortimo so that this solves problems of linear programming, I am using C language, when calculating the limit of the variables I keep the values in a float type array, I need to order that array but it erases a data...
Good, our first for runs 16 positions in this case and we want that both padre as punto have the same value for each 2 positions (That is, for i=0 and i=1 the same value, for i=2 and i=3 other ....)....
Today I come to pose a problem, more of algorithm than of language. I need to get to generate one, several, or all the possible combinations of 25 elements, (or I would even be satisfied with at least one combination with as many elements as pos...
In some texts (many), where the algorithm BFS is explained (Search in width - < em> Breadth First Search ) is a section that says that the complexity of this is O(v+e) , or failing O(v2) . That is, a problem P, but in some AI texts...