MCPcopy Create free account
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / peek

Function peek

chapter02/2.7 - Intersection/intersection.js:3–5  ·  view source on GitHub ↗
(stack)

Source from the content-addressed store, hash-verified

1var LinkedList = require('./../util/LinkedList');
2
3var peek = function(stack) {
4 return stack[stack.length - 1];
5};
6
7var intersection = function(head1, head2) {
8 var stack1 = [];

Callers 1

intersectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected