Last active
September 28, 2021 16:10
Revisions
-
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 1 addition and 16 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -63,19 +63,4 @@ Example 2 Given the string <code>s = 'I love to code very much'</code> The output would be <code> s= 'much very code to love I'</code> -
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 26 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -50,6 +50,32 @@ Given the set Constraints * `n, m <= 100` ### Challenge 4 Given a string <code>s</code>, you need to reverse the order of the words. Exemple 1 Given the string <code>s = 'Hello World'</code> The output would be <code> s= 'World Hello'</code> Example 2 Given the string <code>s = 'I love to code very much'</code> The output would be <code> s= 'much very code to love I'</code> ### Challenge 5 Given a string <code>s</code>, you need to reverse the individual words. Exemple 1 Given the string <code>s = 'Hello World'</code> The output would be <code> s= 'olleH dlroW'</code> Example 2 Given the string <code>s = 'I love to code very much'</code> The output would be <code> s= 'I evol ot edoc yrev hcum'</code> -
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,8 @@ Exemple 1 Given the set <code>[1, 2, 3]</code> and the set <code>[3, 4]</code> the output would be <code>[1, 2, 4]</code> Constraints * `n, m <= 100` -
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -40,13 +40,15 @@ Thus, the program must return the position of the first and last element of the In this example, the positions 2 and 5, considering the first position with index 0. ### Challenge 3 Given two arrays of integers (lengths n and m), find the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) between them. Exemple 1 Given the set <code>[1, 2, 3]</code> and the set <code>[3, 4]</code> the output would be <code>[1, 2, 4]</code> Constraint -
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Given two sets of numbers, find the [symmetric difference](https://en.wikipedia. Exemple 1 Given the set <code>[1, 2, 3]</code> and the set <code>[3, 4]</code> the output would be <code>[1, 2, 4]</code> -
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -40,11 +40,13 @@ Thus, the program must return the position of the first and last element of the In this example, the positions 2 and 5, considering the first position with index 0. ### Challenge 3 Given two sets of numbers, find the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) between them. Exemple 1 Given the set <code>[1, 2, 3]</code> and the set <code>[3, 4] </code> the output would be <code>[1, 2, 4]</code> -
rui-localyze revised this gist
Sep 14, 2021 . 1 changed file with 3 additions and 14 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -40,22 +40,11 @@ Thus, the program must return the position of the first and last element of the In this example, the positions 2 and 5, considering the first position with index 0. ### Challenge 3 Given two sets of numbers, find the symmetric difference between them. Exemple 1 Given the set <code>[1, 2, 3]</code> and the set <code>[3, 4] </code> the output would be <code>[1, 2, 4]</code> -
rui-localyze renamed this gist
Sep 14, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rui-localyze renamed this gist
Sep 14, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rui-localyze created this gist
Sep 14, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ # Localyze ### Coding challenge This is our coding challenge, aimed at getting to know you and your code skills a bit better. There's no time limit on the challenge, but we expect you to invest just a couple of hours of your day. Most of all, we hope you have fun working on this, show off your skills! ### What is expected of you? Choose at least one of the following challenges and using Ruby or Javascript send us the solution to the challenge, ideally hosted on Github or Gitlab. There is no requirement in using a specific framework or tooling, so it’s up to you to use whatever you find yourself comfortable with. Tests are welcome too. Please remember to add some documentation explaining how to use your solution. ### Challenge 1 Given a word, write an algorithm that returns the sequence of a specific character that appears the most in sequence. If there are many of them, return the first character. Examples Given the input `"Pressuuuuuure"` the output is `"uuuuuu"` Given the input `"Boat"` the output is `"B"` Given the input <code>"A hot  dog"</code> the output is <code>"  "</code> (2 spaces!) ### Challenge 2 Given a set of numbers, find the subset in which the sum of the elements is the maximum sum. Example Given the set of elements `[2, -4, 6, 8, -10, 100, -6, 5]` The maximum sum subset is: `[2, -4,`**`6, 8, -10, 100`**`, -6, 5]` Thus, the program must return the position of the first and last element of the subset. In this example, the positions 2 and 5, considering the first position with index 0. ### Challenge 3 Given a string `s` consists of some words separated by some number of spaces, return the length of the last word in the string. A word is a maximal substring consisting of non-space characters only. Example 1 Given the input `s = "Hello World"` the output is 5 Example 2 Given the input <code> s = " fly me   to   the moon  " </code> the output is 4 Example 3 Given the input `s = "luffy is still joyboy"` the output is 6 Constraints * `1 <= s.length <= 104` * s consists of only English letters and spaces ' '. * There will be at least one word in s.