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
console.log(mapa.size) // 4 |
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
console.log(mapa.get(“texto”)) // "A chave é do tipo string" | |
console.log(mapa.get(2)) // "A chave é do tipo numérico" | |
console.log(mapa.get(ler)) // "A chave é uma função" | |
console.log(mapa.get(carro)) // "A chave é um objeto" |
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
let mapa = new Map() | |
function ler(){} | |
const carro = {} | |
mapa.set("texto", "A chave é do tipo string") | |
mapa.set(2, "A chave é do tipo numérico") | |
mapa.set(ler, "A chave é uma função") | |
mapa.set(carro, "A chave é um objeto") |
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
package binarySearch | |
import java.util.* | |
/** | |
* Created by Mateus Marquezini on 28/04/2017. | |
*/ | |
class BinarySearch | |
fun main(args: Array<String>){ |
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 java.util.Arrays; | |
/** | |
* Created by mateus marquezini on 09-09-2016. | |
*/ | |
public class Solution { | |
public int solution(int[] A) { | |
int count = 1; |
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 java.util.Arrays; | |
/** | |
* Created by mateus marquezini on 27-04-2016. | |
*/ | |
public class Solution { | |
public int solution(int[] A) { | |
Arrays.sort(A); |
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
/** | |
* A zero-indexed array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is also moved to the first place. | |
For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, 7]. The goal is to rotate array A K times; that is, each element of A will be shifted to the right by K indexes. | |
Write a function: | |
class Solution { public int[] solution(int[] A, int K); } | |
that, given a zero-indexed array A consisting of N integers and an integer K, returns the array A rotated K times. |
NewerOlder