This file contains hidden or 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
def generateSimilarString(text, maxRepeated): | |
mapping = dict() | |
similarString = '' | |
# Iterate over each character | |
for i in range(len(text)): | |
# Checks if the current character is different to the previous character, to re-initialze the repeated times | |
if (i > 0 and text[i] != text[i-1]): | |
mapping[text[i-1]] = 0 |
This file contains hidden or 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 "holberton.h" | |
#include <stdlib.h> | |
/** | |
* free_grid - ... | |
* @grid: ... | |
* @height: ... | |
* | |
* Return: ... | |
*/ |
This file contains hidden or 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 "head.h" | |
/** | |
* main - Prints a fun text | |
* | |
* Return: Nothing | |
*/ | |
void main(void) | |
{ | |
_putchar('#'); |
This file contains hidden or 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
int _putchar(char c); |
This file contains hidden or 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 <unistd.h> | |
/** | |
* _putchar - writes the character c to stdout | |
* @c: The character to print | |
* @author: julienbarbier42 | |
* | |
* Return: On success 1. | |
* On error, -1 is returned, and errno is set appropriately. | |
*/ |
This file contains hidden or 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> | |
int main(void) | |
{ | |
printf("Hello world"); | |
return (0); | |
} |