Questions tagged as 'algoritmos'

2
answers

Best search algorithm in C #

I was wondering if anyone knows what kind of methods are the most efficient to implement in very intensive searches (arrays) (I speak of arrays of millions of elements) from C #, for example it is better to use IndexOf or BinarySearch to obtain...
asked by 01.09.2016 / 03:44
3
answers

Prime numbers in javascript

I've been surfing the internet, but I can not find an algorithm to search for prime numbers. var cantidad = 100,j=2; for(var i=2;i<cantidad;i++) { for(;j<cantidad;j++) { if(j%i==0 && (i==j || i==1)) {...
asked by 29.08.2017 / 18:42
2
answers

Validate an object within set, list, map

class Coordenada(){ int fila; int columna; //los getter and setter } int main(){ std::set<Coordena> coordenadaSet(Coordenada(4,6)); Coordenada coordenada(5,6); if(coordendaSet.find(coordenada) != coordenadaSet.end()){...
asked by 08.10.2018 / 11:10
1
answer

how to traverse attributes of a class in C #?

I have several classes with different attributes, one of them for example is: class MGestion { public int age { get; set; } public String gestion { get; set; } public String inicio { get; set; } public String fin { get; set; }...
asked by 29.03.2018 / 20:19
3
answers

I have problems with certain libraries C

I'm doing my university project and I'm creating several libraries, among them I have these #include "menus.h" #include "usuario.h" #include "listaMaterias.h" #include "validacion.h" The problem I have is that the library "validacion.h"...
asked by 28.11.2016 / 20:23
5
answers

How to organize an array?

How do I get this program to organize the data in the same Array so that first the numbers are greater than 0 and then the zeros in the Ordenar() method? For example: Entry    (2,3,0,1,0) Exit    (2,3,1,0,0) He...
asked by 02.11.2016 / 18:47
4
answers

Compare the elements of an array against itself

I need to go through an arraylist and compare each element of the array with all the elements of the same array and know which one is repeated more times; I have something like that for (int x = 0; x < lista1.size(); x++) { int t...
asked by 01.07.2017 / 19:36
1
answer

Simplify a heavy document (1 GB)

I'm dealing with a Geoide model, specifically the EGM2008 : This file contains the Geoid undulation (in meters) with respect to the ellipsoid WGS84, with a mesh pitch of 2.5 '(minutes) Occupy 1.28 GB Example of the file | LAT...
asked by 06.10.2017 / 16:22
2
answers

Read a single character in C

I was doing a menu of options and I ran into a problem. When I put "a" and press enter I go to option a but if I put "a3214" it also takes me to option a. My question is if I can avoid that and show an error message if it is not only the opti...
asked by 12.11.2016 / 16:48
2
answers

Voracious Algorithms

I am a student of programming and I would like to know if any of them can give me an idea of how to perform the following problem using voracious algorithms.    Find a good solution to the following problem using a voracious algorithm. Explai...
asked by 25.04.2016 / 03:25