Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #33 from ziyadedher/patch-1
Browse files Browse the repository at this point in the history
Create sum-strings.html
  • Loading branch information
LukeSchlangen authored Oct 22, 2017
2 parents 78ecd51 + 7bca89a commit 5543eb5
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
60 changes: 60 additions & 0 deletions views/questions/whiteboard/sum-strings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>Sum List of Strings | Software Interview Whiteboard Questions </title>
<meta name="description" content="Creators of Approachable Open Source projects to allow anyone to start contribute to open source software, regardless of technical skill level.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../../styles.css">

<!-- Icon and Favicon Files -->
<link rel="apple-touch-icon" sizes="180x180" href="../../../images/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../../../images/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../../../images/icons/favicon-16x16.png">
<link rel="manifest" href="../../../images/icons/manifest.json">
<link rel="mask-icon" href="../../../images/icons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
</head>

<body>
<a href="../../../index.html">
<img class="top-left-logo" src="../../../images/approachable-open-source-logo.png" alt="Approachable Open Source Logo" width="20px" />
</a>
<div class="text-container">
<h1>Sum List of Strings</h1>
<a href="../../whiteboard.html">
More whiteboard interview questions
</a>
<h3>Question:</h3>

<p>Write a function that takes in a list of strings that represent numbers and return the total after adding them all.</p>

<h4>Approach: </h4>

<p>Most programming languages have a feature to iterate over a list, and to convert from a string to a number. Utilize them both to solve this problem.</p>

<div class="hidden-answer">
<input type="checkbox" id="sum-strings-answer">
<label for="sum-strings-answer">Click to see an answer written in Python</label>
<div class="content">
<script src="https://gist.github.com/ziyadedher/8057917eead3334bdd9ed835eb3719b6.js"></script>
</div>

<input type="checkbox" id="sum-strings-adv-answer">
<label for="sum-strings-adv-answer">Click to see an advanced answer written in Python</label>
<div class="content">
<script src="https://gist.github.com/ziyadedher/0cf0a6f608dc57896b28f6dae42bba2c.js"></script>
</div>
</div>
</div>
<footer>
<hr>
<p class="text-container">An
<a href="https://github.com/approachable-io/welcome">Approachable Open Source</a> project from
<a href="http://www.approachable.io">Approachable IO</a>
</p>
</footer>
</body>

</html>
4 changes: 4 additions & 0 deletions views/whiteboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ <h1>Software Interview Whiteboard Questions</h1>
<a href="questions/whiteboard/fizz-buzz.html">
Fizz Buzz
</a>
<br />
<a href="questions/whiteboard/sum-strings.html">
Sum List of Strings
</a>
</div>
<footer>
<hr>
Expand Down

0 comments on commit 5543eb5

Please sign in to comment.