$(function(){
$("#headerSearchForm").on("submit", function(event)
{
event.preventDefault();
var query = $.trim($("#headerSearchQ").val());if (query.length == 0) {return false;}
location.href = "https://buscador.rincondelvago.com/" + query.replace(/[^ a-záâàäéêèëíîìïóôòöúûùüçñA-ZÁÂÀÄÉÊÈËÍÎÌÏÓÔÒÖÚÛÙÜÇÑ0-9'"]/g,"").replace(/ /g,"+");
});
$("#bodySearchForm").on("submit", function(event)
{
event.preventDefault();
var query = $.trim($("#bodySearchQ").val());if (query.length == 0) {return false;}
location.href = "https://buscador.rincondelvago.com/" + query.replace(/[^ a-záâàäéêèëíîìïóôòöúûùüçñA-ZÁÂÀÄÉÊÈËÍÎÌÏÓÔÒÖÚÛÙÜÇÑ0-9'"]/g,"").replace(/ /g,"+");
});
});
var div_1_sizes = [
[320, 100],
[320, 50],
[300, 250],
[300, 600]
];
var div_2_sizes = [[970, 90], [728, 90],[970, 250]];
var PREBID_TIMEOUT = 2000;
var adUnits = [{
code: 'div-gpt-ad-1498674722723-0',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485609'
}
}]
},{
code: 'div-gpt-ad-1515779430602-1',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485931'
}
}]
},{
code: 'div-gpt-ad-1515779430602-2',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485934'
}
}]
},{
code: 'div-gpt-ad-1515779430602--3',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485937'
}
}]
},{
code: 'div-gpt-ad-1515779430602--4',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485941'
}
}]
},{
code: 'div-gpt-ad-1515779430602--5',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485945'
}
}]
},{
code: 'div-gpt-ad-1515779430602--6',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485949'
}
}]
},{
code: 'div-gpt-ad-1515779430602--7',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485953'
}
}]
},{
code: 'div-gpt-ad-1515779430602--8',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485956'
}
}]
},{
code: 'div-gpt-ad-1515779430602--9',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485957'
}
}]
},{
code: 'div-gpt-ad-1515779430602--10',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485958'
}
}]
},{
code: 'div-gpt-ad-1515779430602--11',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485959'
}
}]
},{
code: 'div-gpt-ad-1515779430602--12',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485960'
}
}]
},{
code: 'div-gpt-ad-1515779430602--13',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485961'
}
}]
},{
code: 'div-gpt-ad-1515779430602--14',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--15',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--16',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--17',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--18',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--19',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--20',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--21',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--22',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--23',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--24',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
}];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: initAdserver
});
});
function initAdserver() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}
setTimeout(function() {
initAdserver();
}, PREBID_TIMEOUT);
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1498674722723-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
//
// Begin comScore Tag
var _comscore = _comscore || [];
_comscore.push({ c1: "2", c2: "5641052" });
(function() {
var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true;
s.src = (document.location.protocol == "https:" ? "https://sb" : "https://b") + ".scorecardresearch.com/beacon.js";
el.parentNode.insertBefore(s, el);
})();
// End comScore Tag
//
var domain= "rincondelvago.com";
//-->
Compartir
0 Me sirvió
0 No me sirvió
CLASIFICACIÓN POR INTERCAMBIO DIRECTO.-
(METODO DE LA BURBUJA).
-Comparar pares de elementos contiguos
-Intercambiarlos si deben ordenarse
pase i=1 i=2 i=3 i=4 i=5 i=6 i=7 i=8
a[1] | 44 | 06 | 06 | 06 | 06 | 06 | 06 | 06 |
a[2] | 55 | 44 | 12 | 12 | 12 | 12 | 12 | 12 |
a[3] | 12 | 55 | 44 | 18 | 18 | 18 | 18 | 18 |
a[4] | 42 | 12 | 55 | 44 | 42 | 42 | 42 | 42 |
a[5] | 94 | 42 | 18 | 55 | 44 | 44 | 44 | 44 |
a[6] | 18 | 94 | 42 | 42 | 55 | 55 | 55 | 55 |
a[7] | 06 | 18 | 94 | 67 | 67 | 67 | 67 | 67 |
a[8] | 67 | 67 | 67 | 94 | 94 | 94 | 94 | 94 |
| | | | | | | | |
orden
inicial
descripción:
Hacemos varios pases sobre el arreglo, y en cada
recorrido desplazamos el elemento más pequeño
del conjunto restante hacia el extremo final del
arreglo, es decir:
Se comienza comparando a[1] con a[2]; si están
desordenados , se intercambian entre sí . A con-
tinuación se compara a[2] con a[3], intercambian-
dolos si están desordenados.
PROCEDURE intercambioDirecto;
VAR
i,j:index;
x:item;
BEGIN
FOR i:=2 TO n DO
FOR j:=n TO i BY -1 DO
IF a[j-1]>a[j] THEN
(*intercambia*)
x:=a[j-1];
a[j-1]:=a[j];
a[j]:=x;
END
END
END
END ordenación_por_burbuja
Análisis:
En la lista i representa el número de pasada y j indica el orden del elemento de la lista, es decir:
pase i=1
a[1] | 44 |
a[2] | 55 |
a[3] | 12 |
a[4] | 42 |
a[5] | 94 |
a[6] | 18 |
a[7] | 06! |
a[8] | 67! |
j=n-1
comparación 1, ningún intercambio
a[1] | 44 | 44 |
a[2] | 55 | 55 |
a[3] | 12 | 12 |
a[4] | 42 | 42 |
a[5] | 94 | 94 |
a[6] | 18 | 06! |
a[7] | 06 | 18! |
a[8] | 67 | 67 |
j=n-2
2ªcomparación ,un intercambio
pasada i=1
pase i=2 i=2 i=2 i=2 i=2 i=2 i=2 i=2
a[1] | 44 | 44 | 44 | 44 | 44 | 44 | 06 | 06 |
a[2] | 55 | 55 | 55 | 55 | 55 | 06 | 44 | 44 |
a[3] | 12 | 12 | 12 | 12 | 06 | 55 | 55 | 55 |
a[4] | 42 | 42 | 42 | 06 | 12 | 12 | 12 | 12 |
a[5] | 94 | 94 | 06 | 42 | 42 | 42 | 42 | 42 |
a[6] | 18 | 06 | 94 | 94 | 94 | 94 | 94 | 94 |
a[7] | 06 | 18 | 18 | 18 | 18 | 18 | 18 | 18 |
a[8] | 67 | 67 | 67 | 67 | 67 | 67 | 67 | 67 |
| j=n | j=n-1 | j=n-2 | j=n-3 | j=n-4 | j=n-5 | j=n-6 | j=n-7 |
Es decir, por cada pasada se necesitan 7 comparaciones siendo 8 los elementos; el número de comparaciones totales viene dado
por;
Pasada Comparaciones
1 n-1
2 n-2
.. ..
n-1 1
Descargar
Enviado por: | El remitente no desea revelar su nombre |
Idioma: | castellano |
País: | España |