Multiply
0
0
2
2
-1
-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
[]: [] | |
[6]: [1] | |
[2, 4]: [4, 2] | |
[1, 1, 1, 1, 1]: [1, 1, 1, 1, 1] | |
[2, 2, 2, 2, 2]: [16, 16, 16, 16, 16] | |
[0, 1, 2, 3, 4]: [24, 0, 0, 0, 0] | |
[0, 1, 2, 0, 4]: [0, 0, 0, 0, 0] | |
[1, 2, 3, 4, 2]: [48, 24, 16, 12, 24] |
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
# Task executed successfully. | |
# --------------------------------- | |
# Input parameters: ("0151-319723") | |
# Result: No | |
# OK | |
# --------------------------------- | |
# Input parameters: ("(123) 456-7890") | |
# Result: 1234567890 | |
# OK |
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
# frozen_string_literal: true | |
# quickstart | |
# | |
# ruby count_even_substrings.rb | |
def count_even_substrings(str) | |
j = 0 | |
size = str.size | |
acc = [] |
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
# frozen_string_literal: true | |
class FriendlierUuid | |
def initialize(uuid) | |
@uuid = uuid | |
end | |
def encode | |
remove_hyphens | |
conver_hexadecimal_to_bcd |
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
require 'pry' | |
require 'pry-nav' | |
class Application | |
def self.call(*args, &) | |
new(*args, &).call | |
end | |
private |
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
<?xml version="1.0"?> | |
<catalog> | |
<book id="bk101"> | |
<author>Gauthorambardella, Matthew</author> | |
<title>XML Developer's Guide</title> | |
<genre>Computer</genre> | |
<price>44.95</price> | |
<publish_date>2000-10-01</publish_date> | |
<description>An in-depth look at creating applications | |
with XML.</description> |
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
# frozen_string_literal: true | |
# Quickstart | |
# | |
# Install: | |
# > gem install rspec --no-document | |
# | |
# Run tests | |
# > rspec -f d property_titles_service.rb | |
# |
NewerOlder