Skip to content

Commit 17f2fdd

Browse files
committed
Inject exported images into challenge readmes
1 parent 2915e8e commit 17f2fdd

File tree

57 files changed

+147
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+147
-155
lines changed

Diff for: easy/180-knight-moves/assets/fig-1.png

45.6 KB
Loading

Diff for: easy/180-knight-moves/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
horizontally and one square vertically:
99
</p>
1010

11+
<p>
12+
<img src="assets/fig-1.png" alt="Figure 1">
13+
</p>
14+
1115
<p>
1216
Your task is to find all possible positions for the next move of the knight on the empty chessboard.
1317
</p>
@@ -49,4 +53,4 @@ a3 c3 d2</pre>
4953
<h3>Constraints:</h3>
5054
<ul>
5155
<li>The number of test cases is 40.</li>
52-
</ul>
56+
</ul>

Diff for: easy/183-details/assets/fig-1.png

20.4 KB
Loading

Diff for: easy/183-details/assets/fig-2.png

42 KB
Loading

Diff for: easy/183-details/readme.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@
99

1010
<p>For example:</p>
1111

12+
<p>
13+
<img src="assets/fig-1.png" alt="Figure 1">
14+
</p>
15+
1216
<p>
1317
Also, the details may have cavities (or other complex structures). Please see example below (the detail Y is one detail):
1418
</p>
1519

20+
<p>
21+
<img src="assets/fig-2.png" alt="Figure 2">
22+
</p>
23+
1624
<p>
1725
The detail Y starts moving left (without any turn) until it bumps into the X detail at least with one cell.
1826
Determine by how many cells the detail Y will be moved.
@@ -48,4 +56,4 @@ XXYY,X..Y,XX.Y</pre>
4856
<ol>
4957
<li>The matrices can be of different M*N sizes. (2 &lt;= M &lt;= 10, 2 &lt;= N &lt;= 10)</li>
5058
<li>Number of test cases is 40.</li>
51-
</ol>
59+
</ol>

Diff for: easy/208-find-the-highest-score/assets/fig-1.png

79 KB
Loading

Diff for: easy/208-find-the-highest-score/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
You need to determine and print the highest score of each category in the table.
1515
</p>
1616

17+
<p>
18+
<img src="assets/fig-1.png" alt="Figure 1">
19+
</p>
20+
1721
<h3>Input sample:</h3>
1822

1923
<p>
@@ -50,4 +54,4 @@
5054
<li>The number of categories can be from 4 to 20.</li>
5155
<li>The number of points for one picture can be from -1000 to 1000.</li>
5256
<li>The number of test cases is 40.</li>
53-
</ol>
57+
</ol>

Diff for: easy/227-real-fake/assets/fig-1.png

125 KB
Loading

Diff for: easy/227-real-fake/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
</p>
1414

15+
<p>
16+
<img src="assets/fig-1.png" alt="Figure 1">
17+
</p>
18+
1519
<h3>Input sample:</h3>
1620

1721
<p>
@@ -35,4 +39,4 @@ Real</pre>
3539
<ol>
3640
<li>The credit card number is 16 digits in length.</li>
3741
<li>The number of test cases is 40.</li>
38-
</ol>
42+
</ol>

Diff for: hard/090-commuting-engineer/assets/fig-1.png

270 KB
Loading

Diff for: hard/090-commuting-engineer/readme.md

+5-65
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<h2>Commuting Engineer</h2>
22

3-
<div id="map-canvas"></div>
4-
5-
<br>
63
<h3>Challenge Description:</h3>
4+
5+
<p>
6+
<img src="assets/fig-1.png" alt="Figure 1">
7+
</p>
8+
79
<p>
810
Commuters in the bay area who commute to and from South Bay spend
911
on average 2-3 hours of valuable time getting to and from work every day.
@@ -74,65 +76,3 @@
7476
New Relic or Glassdoor, you&apos;ll be able to apply directly after submitting
7577
your solution. Let&apos;s see if it cuts down your work commute!
7678
</p>
77-
78-
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyATY9ALwgMNKu3ggL8aJlHy09qiNZaNcIA&amp;sensor=false"></script>
79-
<script type="text/javascript" src="https://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.8/src/markerwithlabel.js"></script>
80-
<script type="text/javascript">
81-
var google_map;
82-
var google_map_center = new google.maps.LatLng(37.780145, -122.402544);
83-
function initialize() {
84-
var mapDiv = document.getElementById('map-canvas');
85-
google_map = new google.maps.Map(mapDiv, {
86-
center: google_map_center,
87-
zoom: 14,
88-
mapTypeId: google.maps.MapTypeId.ROADMAP
89-
});
90-
}
91-
92-
$(function() {
93-
initialize();
94-
95-
var sf_coords_str = "1 | CodeEval 1355 Market St, SF (37.7768016, -122.4169151)\n\
96-
2 | Yelp 706 Mission St, SF (37.7860105, -122.4025377)\n\
97-
3 | Square 110 5th St, SF (37.7821494, -122.4058960)\n\
98-
4 | Airbnb 99 Rhode Island St, SF (37.7689269, -122.4029053)\n\
99-
5 | Dropbox 185 Berry St, SF (37.7768800, -122.3911496)\n\
100-
6 | Zynga 699 8th St, SF (37.7706628, -122.4040139)\n\
101-
7 | Mashery 717 Market St, SF (37.7870361, -122.4039444)\n\
102-
8 | Flurry 3060 3rd St, SF (37.7507903, -122.3877184)\n\
103-
9 | New Relic 188 Spear St, SF (37.7914417, -122.3927229)\n\
104-
10 | Glassdoor 1 Harbor Drive, Sausalito (37.8672841, -122.5010216)";
105-
106-
var sf_coords = [];
107-
var markers = {};
108-
var lines = [];
109-
110-
sf_coords_str_lines = sf_coords_str.split("\n");
111-
for (i = 0; i < sf_coords_str_lines.length; i++){
112-
var matches = sf_coords_str_lines[i].match(/(\d+) .*?\((\-*\d+\.*\d*),\s*(\-*\d+\.*\d*)\)/);
113-
sf_coords.push([parseInt(matches[1]), parseFloat(matches[2]), parseFloat(matches[3])]);
114-
}
115-
for (i = 0; i < sf_coords.length; i++){
116-
var point_name = "" + sf_coords[i][0];
117-
markers[point_name] = new MarkerWithLabel({
118-
position: new google.maps.LatLng(sf_coords[i][1], sf_coords[i][2]),
119-
map: google_map,
120-
labelContent: point_name
121-
// labelClass: "labels", // the CSS class for the label
122-
// labelStyle: {opacity: 0.75}
123-
});
124-
}
125-
var right_order = ["1", "3", "2", "5", "6", "4"];
126-
for (i = 0; i < right_order.length - 1; i++){
127-
var line = new google.maps.Polyline({
128-
path: new Array(markers[right_order[i]].getPosition(),markers[right_order[i+1]].getPosition()),
129-
strokeColor: '#ff0000',
130-
strokeOpacity: 1.0,
131-
strokeWeight: 2
132-
});
133-
line.setMap(google_map);
134-
}
135-
136-
});
137-
138-
</script>

Diff for: hard/109-bay-bridges/assets/fig-1.png

211 KB
Loading

Diff for: hard/109-bay-bridges/readme.md

+6-66
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<h2>Bay Bridges</h2>
22

3-
<div id="map-canvas"></div>
4-
5-
<br>
63
<h3>Challenge Description:</h3>
74

5+
<p>
6+
<img src="assets/fig-1.png" alt="Figure 1">
7+
</p>
8+
89
<p>
910
A new technological breakthrough has enabled us to build bridges that can
1011
withstand a 9.5 magnitude earthquake for a fraction of the cost. Instead of
1112
retrofitting existing bridges which would take decades and cost at least
1213
3x the price we&apos;re drafting up a proposal rebuild all of the bay area&apos;s
13-
bridges more efficiently between strategic coordinates outlined below.
14+
bridges more efficiently between strategic coordinates outlined below.
1415
</p>
1516

1617
<p>
1718
You want to build the bridges as efficiently as possible and connect as many
1819
pairs of points as possible with bridges such that no two bridges cross.
1920
When connecting points, you can only connect point 1 with another point 1,
20-
point 2 with another point 2.
21+
point 2 with another point 2.
2122
</p>
2223

2324
<p>
@@ -53,64 +54,3 @@
5354
<p>
5455
(Check lines on the map)
5556
</p>
56-
57-
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyATY9ALwgMNKu3ggL8aJlHy09qiNZaNcIA&amp;sensor=false"></script>
58-
<script type="text/javascript" src="https://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.8/src/markerwithlabel.js"></script>
59-
<script type="text/javascript">
60-
var google_map;
61-
var google_map_center = new google.maps.LatLng(37.640879, -122.25174);
62-
function initialize() {
63-
var mapDiv = document.getElementById('map-canvas');
64-
google_map = new google.maps.Map(mapDiv, {
65-
center: google_map_center,
66-
zoom: 10,
67-
mapTypeId: google.maps.MapTypeId.ROADMAP
68-
});
69-
}
70-
71-
$(function() {
72-
initialize();
73-
74-
var sf_coords_str = "1: ([37.788353, -122.387695], [37.829853, -122.294312])\n\
75-
2: ([37.429615, -122.087631], [37.487391, -122.018967])\n\
76-
3: ([37.474858, -122.131577], [37.529332, -122.056046])\n\
77-
4: ([37.532599,-122.218094], [37.615863,-122.097244])\n\
78-
5: ([37.516262,-122.198181], [37.653383,-122.151489])\n\
79-
6: ([37.504824,-122.181702], [37.633266,-122.121964])";
80-
81-
var sf_coords = [];
82-
var markers = {};
83-
var lines = [];
84-
85-
sf_coords_str_lines = sf_coords_str.split("\n");
86-
for (i = 0; i < sf_coords_str_lines.length; i++){
87-
var matches = sf_coords_str_lines[i].match(/(\d+)\:\s*\(\[(\-*\d+\.*\d*),\s*(\-*\d+\.*\d*)\],\s*\[(\-*\d+\.*\d*),\s*(\-*\d+\.*\d*)\]\)/);
88-
sf_coords.push([parseInt(matches[1]), parseFloat(matches[2]), parseFloat(matches[3]), parseFloat(matches[4]), parseFloat(matches[5])]);
89-
}
90-
for (i = 0; i < sf_coords.length; i++){
91-
var point_name = "" + sf_coords[i][0];
92-
markers[point_name + "1"] = new MarkerWithLabel({
93-
position: new google.maps.LatLng(sf_coords[i][1], sf_coords[i][2]),
94-
map: google_map,
95-
labelContent: point_name
96-
});
97-
markers[point_name + "2"] = new MarkerWithLabel({
98-
position: new google.maps.LatLng(sf_coords[i][3], sf_coords[i][4]),
99-
map: google_map,
100-
labelContent: point_name
101-
});
102-
}
103-
//var right_order = ["1", "5", "2", "3", "4"];
104-
for (i = 0; i < sf_coords.length; i++){
105-
var line = new google.maps.Polyline({
106-
path: new Array(markers[sf_coords[i][0] + "1"].getPosition(),markers[sf_coords[i][0] + "2"].getPosition()),
107-
strokeColor: (i != 3)?'#ff0000':'#0000ff',
108-
strokeOpacity: 1.0,
109-
strokeWeight: 2
110-
});
111-
line.setMap(google_map);
112-
}
113-
114-
});
115-
116-
</script>

Diff for: hard/120-skyscrapers/assets/fig-1.png

18.5 KB
Loading

Diff for: hard/120-skyscrapers/assets/fig-2.png

14.4 KB
Loading

Diff for: hard/120-skyscrapers/readme.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
right coordinates of the building and H is the height of the building.
88
All buildings are rectangular in shape and they are standing on a very flat surface. E.g.
99
<br>
10+
<br>
11+
12+
<img src="assets/fig-1.png" alt="Figure 1">
1013

1114
<br>
1215

16+
<img src="assets/fig-2.png" alt="Figure 2">
17+
1318
<br>
19+
1420
On the first diagram the buildings are represented by the following triples:
1521
</p>
1622
<pre>(1,2,3); (2,4,6); (4,5,5); (7,3,11); (9,2,14); (13,7,15); (14,3,17)</pre>
@@ -45,4 +51,4 @@
4551
Constraints:
4652
<br>
4753
H in range (1, 100), max(x-coordinate) &lt;= 10000, number of buildings &lt;= 1000
48-
</p>
54+
</p>

Diff for: hard/154-ip-package/assets/fig-1.png

117 KB
Loading

Diff for: hard/154-ip-package/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ You need to replace the IP source and destination IP address to the new addresse
1313
This means you should calculate checksum of IP header.
1414
</p>
1515

16+
<p>
17+
<img src="assets/fig-1.png" alt="Figure 1">
18+
</p>
19+
1620
<h3>Input sample:</h3>
1721
<p>
1822
Your program should accept as its first argument a path to a filename.
@@ -27,4 +31,4 @@ Each line contains new source ip address, new destination ip address and package
2731
For each line of input print out ip header with new destination and source ip address and valid checksum
2832
</p>
2933

30-
<pre class="description-input-output">45 04 05 dc b7 3a 40 00 2e 06 11 cd be a8 00 60 be a8 00 60</pre>
34+
<pre class="description-input-output">45 04 05 dc b7 3a 40 00 2e 06 11 cd be a8 00 60 be a8 00 60</pre>

Diff for: hard/168-the-frequency/assets/fig-1.png

81.4 KB
Loading

Diff for: hard/168-the-frequency/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
the signal can move linearly up or down relative to zero level:
1010
</p>
1111

12+
<p>
13+
<img src="assets/fig-1.png" alt="Figure 1">
14+
</p>
15+
1216
<p>
1317
Your task is to find the frequency of each signal.
1418

@@ -48,4 +52,4 @@
4852
<li>Signal amplitude is not lower than 20.</li>
4953
<li>Signal amplitude change and the move relative to zero level on the segment are linear and do not change
5054
their direction.</li>
51-
</ol>
55+
</ol>

Diff for: hard/182-longest-path/assets/fig-1.png

22.7 KB
Loading

Diff for: hard/182-longest-path/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
Example of a 5&#xD7;5 matrix, where L=15:
1212
</p>
1313

14+
<p>
15+
<img src="assets/fig-1.png" alt="Figure 1">
16+
</p>
17+
1418
<h3>Input sample:</h3>
1519

1620
<p>
@@ -45,4 +49,4 @@ bjzanjikh</pre>
4549
<ol>
4650
<li>N is in a range from 2 to 6.</li>
4751
<li>The number of test cases is 20.</li>
48-
</ol>
52+
</ol>

Diff for: hard/188-distinct-triangles/assets/fig-1.png

19.8 KB
Loading

Diff for: hard/188-distinct-triangles/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
<p>For example:</p>
1313

14+
<p>
15+
<img src="assets/fig-1.png" alt="Figure 1">
16+
</p>
17+
1418
<p>
1519
N is 2 in this graph.
1620
</p>
@@ -45,4 +49,4 @@
4549
<li>1 &lt;= V, E &lt;= 100</li>
4650
<li>0 &lt;= vertex &lt; V</li>
4751
<li>Number of test cases is 10.</li>
48-
</ol>
52+
</ol>

Diff for: hard/191-lights-out/assets/fig-1.png

58.2 KB
Loading

Diff for: hard/191-lights-out/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
Example:
2222
</p>
2323

24+
<p>
25+
<img src="assets/fig-1.png" alt="Figure 1">
26+
</p>
27+
2428
<p>
2529
toggle lights as follows: row 1, column 4; row 2, column 3; row 2, column 4; and row 3, column 4
2630
</p>
@@ -57,4 +61,4 @@ all the lights turn off, or -1 if it is not possible.
5761
<h3>Constraints:</h3>
5862
<ol>
5963
<li>Number of test cases is equal to 20.</li>
60-
</ol>
64+
</ol>

Diff for: hard/204-straight-lines/assets/fig-1.png

42 KB
Loading

Diff for: hard/204-straight-lines/readme.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
we can create two lines.
1111
</p>
1212

13+
<p>
14+
<img src="assets/fig-1.png" alt="Figure 1">
15+
</p>
16+
1317
<h3>Input sample:</h3>
1418

1519
<p>
@@ -47,4 +51,4 @@
4751
</li>
4852
<li>Point coordinates can be in a range from -20 to 20.</li>
4953
<li>The number of test cases is 40.</li>
50-
</ol>
54+
</ol>

Diff for: hard/207-which-way-is-faster/assets/fig-1.png

36.5 KB
Loading

0 commit comments

Comments
 (0)