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
#include <stdio.h> | |
#define MAX 100 | |
int main() { | |
int total; | |
int vNumeros[MAX]; | |
int j, i, temp; | |
printf ("Cuantos numeros deseas ordenar? "); | |
scanf("%d", &total); |
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
RewriteEngine on | |
RewriteCond $1 !^(index\.php|images|php|script|styles|js|css) | |
RewriteRule ^(.*)$ /index.php/$1 [L] |
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
print "Hola Mundo" | |
#Numeros hexadecimales anteponiendo 0x | |
hexa = 0xA | |
print hexa | |
#Numeros octales anteponiendo un 0 | |
octal = 010 | |
print octal |
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
/* Conversión de número decimal a número binario */ | |
#include <stdio.h> | |
int main() { | |
int n, c, k; | |
printf("Ingresa el número decimal: "); | |
scanf("%d", &n); | |
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
#https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/529/week-2/3297/ | |
class Solution(object): | |
def lastStoneWeight(self, stones): | |
""" | |
:type stones: List[int] | |
:rtype: int | |
""" | |
while len(stones) > 1: | |
stones.sort() | |
new_value = stones.pop() - stones.pop() |
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 Solution(object): | |
def backspaceCompare(self, S, T): | |
""" | |
:type S: str | |
:type T: str | |
:rtype: bool | |
""" | |
def deleteBackspace(word): | |
temporal = [] |
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
#https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/529/week-2/3290/ | |
class Solution(object): | |
def middleNode(self, head): | |
""" | |
:type head: ListNode | |
:rtype: ListNode | |
""" | |
middle = head |
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 Solution(object): | |
def countElements(self, arr): | |
""" | |
:type arr: List[int] | |
:rtype: int | |
""" | |
result = 0 | |
for j in arr: |
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
#https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/528/week-1/3288/ | |
class Solution(object): | |
def groupAnagrams(self, strs): | |
""" | |
:type strs: List[str] | |
:rtype: List[List[str]] | |
""" | |
keys = {} | |
result = [] |
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 Solution(object): | |
def moveZeroes(self, nums): | |
""" | |
:type nums: List[int] | |
:rtype: None Do not return anything, modify nums in-place instead. | |
""" | |
count = 0 | |
for i, num in enumerate(nums): | |
if num == 0: |
NewerOlder