This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
En este desafío, se te proporcionará un diccionario llamado person que contiene información sobre una persona. Tu reto es realizar las siguientes operaciones en orden: | |
1. Agregar un nuevo elemento al diccionario con la llave "twitter" y el valor "@nicobytes". | |
2. Actualizar el valor del elemento con la llave "name" con el valor "Felipe". | |
3. Eliminar el elemento del diccionario con la llave "age". | |
4. Imprimir una lista con las llaves del diccionario. | |
5. Imprimir una lista con los valores del diccionario. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
En este desafío, se te proporcionará una lista de letras llamada letters. Tu reto es realizar las siguientes operaciones en orden: | |
1. Agregar la letra G al final de la lista. | |
2. Reemplazar la letra en la posición 0 con la letra Z. | |
3. Eliminar la letra C de la lista. | |
4. Imprimir la lista resultante al revés. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Disk { | |
constructor(value) { | |
this.value = value; | |
this.next = null; | |
} | |
} | |
class Peg { | |
constructor() { | |
this.top = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class CarBuilder { | |
// Tu código aquí 👇 | |
constructor() { | |
this.year = 0; | |
this.model = ''; | |
this.brand = ''; | |
this.color = ''; | |
this.price = 0; | |
this.isAvailable = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { User } from "./user"; | |
export class Chat { | |
constructor() { | |
if (!Chat.instance) { | |
this.users = []; | |
Chat.instance = Object.freeze(this); | |
} | |
return Chat.instance; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validateGame(user, cpu){ | |
switch(true){ | |
case (user === cpu): | |
alert("Tie!"); | |
break; | |
case (user === 2 && cpu === 3): | |
alert("CPU wins, sorry!"); | |
break; | |
case (user === 1 && cpu === 2): | |
alert("CPU wins, sorry!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validateGame(user, cpu){ | |
if(user !== cpu){ | |
if(user === 1 && cpu === 3){ | |
alert("You win!"); | |
}else if(user === 2 && cpu === 3){ | |
alert("CPU wins, sorry!"); | |
}else if(user === 2 && cpu === 1){ | |
alert("You win!"); | |
}else if(user === 1 && cpu === 2){ | |
alert("CPU wins, sorry!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* User: Alfonso Neil Jimenez Casallas | |
* Date: 26/08/2016 | |
* Time: 2:42 p. m. | |
* | |
* | |
*/ | |
using System; | |
using System.Globalization; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var SOLVE_CHALLENGE = "Implement the logic of the addNumber and getFirstNonDuplicated functions, do not limit yourself, if you need to create variables just do it. Good Luck"; | |
var ANALYZE_1 = "What are the time (Big O notation) and space complexity of your solution?"; | |
var SOLVE_ANALYZE_1 = "The time complexity for this solution is O(N) where N is the size of 'sequence' array and space complexity is O(M) where M is the size of 'seq_map' set with non duplicated keys from 'sequence' array"; | |
var ANALYZE_2 = "What are the limitations of your solution?"; | |
var SOLVE_ANALYZE_2 = "Map structure data does not have a standard built-in function in JavaScript to sort keys by ascending order and according to values and to get desired results faster and efficiently."; | |
var ANALYZE_3 = "Why have you decided to implement it on that way?"; | |
var SOLVE_ANALYZE_3 = "Because this implementation is one of the simplest and most legible possible solutions for me as a developer, besides it is not the wo |
NewerOlder