Skip to content

Instantly share code, notes, and snippets.

View SenayYakut's full-sized avatar
🎯
Focusing

Senay Yakut SenayYakut

🎯
Focusing
  • San Francisco,CA,USA
View GitHub Profile
@SenayYakut
SenayYakut / 1-linked-list-insert.js
Created October 1, 2019 20:49 — forked from primaryobjects/1-linked-list-insert.js
Inserting a node into a linked list at position x.
/*
Insert Node at a given position in a linked list
head can be NULL
First element in the linked list is at position 0
Node is defined as
var Node = function(data) {
this.data = data;
this.next = null;
}
*/
@SenayYakut
SenayYakut / 1-linked-list-insert.js
Created October 1, 2019 20:49 — forked from primaryobjects/1-linked-list-insert.js
Inserting a node into a linked list at position x.
/*
Insert Node at a given position in a linked list
head can be NULL
First element in the linked list is at position 0
Node is defined as
var Node = function(data) {
this.data = data;
this.next = null;
}
*/
@SenayYakut
SenayYakut / modern_js.md
Created July 30, 2019 23:02 — forked from gaearon/modern_js.md
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@SenayYakut
SenayYakut / dijkstra.js
Created July 21, 2019 19:22 — forked from stella-yc/dijkstra.js
Dijkstra's Algorithm in Javascript using a weighted graph
const problem = {
start: {A: 5, B: 2},
A: {C: 4, D: 2},
B: {A: 8, D: 7},
C: {D: 6, finish: 3},
D: {finish: 1},
finish: {}
};
const lowestCostNode = (costs, processed) => {
@SenayYakut
SenayYakut / zigZag.js
Created July 18, 2019 18:02 — forked from jaewook77/zigZag.js
JavaScript: Algorithm: DP: ZigZag
/**
* ZigZag
* http://community.topcoder.com/stat?c=problem_statement&pm=1259&rd=4493
*
A sequence of numbers is called a zig - zag sequence
if the differences between successive numbers strictly alternate between positive and negative.The first difference(
if one exists) may be either positive or negative.A sequence with fewer than two elements is trivially a zig - zag sequence.
For example, 1, 7, 4, 9, 2, 5 is a zig - zag sequence because the differences(6, -3, 5, -7, 3) are alternately positive and negative.In contrast, 1, 4, 7, 2, 5 and 1, 7, 4, 5, 5 are not zig - zag sequences, the first because its first two differences are positive and the second because its last difference is zero.

SENAY YAKUT, Software Engineer

San Francisco, CA, USA | 415 894 0775 | senaykt@gmail.com

GitHub | LinkedIn | CodePen.io

Objective

A forward-thinking, self-taught developer offering more than 2,5 years of experience building, creating, integrating, supporting and improving Web development.

@SenayYakut
SenayYakut / states_hash.json
Created February 10, 2019 20:35 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@SenayYakut
SenayYakut / states_hash.json
Created February 10, 2019 20:35 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@SenayYakut
SenayYakut / StringBuilder.js
Created December 3, 2018 20:22 — forked from benjamin-wss/StringBuilder.js
String builder for JavaScript
function StringBuilder(value) {
this.strings = new Array();
this.append(value);
}
StringBuilder.prototype.append = function (value) {
if (value) {
this.strings.push(value);
}
}