This repository has been archived by the owner on Sep 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from ziyadedher/patch-1
Create sum-strings.html
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
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> |
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