<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: shopeyin</title>
    <description>The latest articles on DEV Community by shopeyin (@shopeyin).</description>
    <link>https://dev.to/shopeyin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F430170%2Fb1596c1a-237c-4056-ae30-e0fb089861a3.jpeg</url>
      <title>DEV Community: shopeyin</title>
      <link>https://dev.to/shopeyin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shopeyin"/>
    <language>en</language>
    <item>
      <title>Implementing a Singly LinkedList with Javascript</title>
      <dc:creator>shopeyin</dc:creator>
      <pubDate>Thu, 08 Oct 2020 17:22:33 +0000</pubDate>
      <link>https://dev.to/shopeyin/implementing-a-singly-linkedlist-with-javascript-590l</link>
      <guid>https://dev.to/shopeyin/implementing-a-singly-linkedlist-with-javascript-590l</guid>
      <description>&lt;p&gt;A linked list is a linear data structure in which each node&lt;br&gt;
points to another node. Unlike arrays, which have a fixed size, a linked list is a dynamic data structure that can allocate and deallocate memory at runtime.&lt;br&gt;
 There are two types of linked lists: singly and doubly-linked&lt;br&gt;
lists. Let’s examine the singly linked list.&lt;/p&gt;

&lt;h1&gt;
  
  
  SINGLY LINKEDLIST
&lt;/h1&gt;

&lt;p&gt;The linked list data structure is one where each node (element) has a reference or address to the next node i.e each node object stores a data and a link to the next node.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cZM0mSXh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h5xd3vcjovij6ociphle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cZM0mSXh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h5xd3vcjovij6ociphle.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a Node object&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kJ8JecKP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hionk76vp4ieja99jnro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kJ8JecKP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hionk76vp4ieja99jnro.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Implementation of a Singly LinkedList
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8QnTOh4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pxel5g2k93fcj62xtznz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8QnTOh4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pxel5g2k93fcj62xtznz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The logic in the following methods i.e deleteNodeByValue, searchNode, getAllNodeData can be found below&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b55x9mso--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fhxj1x62clbp073ap9hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b55x9mso--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fhxj1x62clbp073ap9hj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nmhnPN0S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zl1fnzlanavu64dgl9gm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nmhnPN0S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zl1fnzlanavu64dgl9gm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4kAcOLcM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zbvsqr2vw8x613v2ad7j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4kAcOLcM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zbvsqr2vw8x613v2ad7j.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Examples
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RmnydAtp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4uo26vju5xou8ybq47z5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RmnydAtp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4uo26vju5xou8ybq47z5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are different methods one can implement in a LinkedList. Till next time!!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Understanding Linear Search and Binary Search in Programming
</title>
      <dc:creator>shopeyin</dc:creator>
      <pubDate>Sat, 08 Aug 2020 07:41:53 +0000</pubDate>
      <link>https://dev.to/shopeyin/understanding-linear-search-in-programming-4nef</link>
      <guid>https://dev.to/shopeyin/understanding-linear-search-in-programming-4nef</guid>
      <description>&lt;p&gt;Searching refers to iterating over the data structure's elements to retrieve some data. When searching in an array, there are two main techniques depending on whether the array is sorted.&lt;br&gt;
With regards to Linear and Binary searching, Linear searches are especially flexible because they can be used with both sorted and unsorted data while Binary searches are specifically used with sorted data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linear Search&lt;/strong&gt;&lt;br&gt;
A linear search works by going through each element of the array one index after another sequentially. The following code example is an implementation of a linear search that iterates through the entire array of numbers to find out whether an item exists within the array.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TFKIRFBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/znn2e6wn2u9zkbiexflg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TFKIRFBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/znn2e6wn2u9zkbiexflg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The time complexity of the linear Search algorithm is O(n) because in the worst-case scenario it will search through all the elements before return false&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Binary Search&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Binary Search is a searching algorithm that works on sorted array. Unlike the linear search algorithm in which every element of the array is checked, binary searches can check the middle value to see whether the desired value is greater or smaller than it. If the desired value is smaller, this algorithm can search through the smaller parts, or it can search through the bigger parts if the desired value is bigger.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hFyWhbfK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q1ulmg8zleyyqgz2dlj7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hFyWhbfK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q1ulmg8zleyyqgz2dlj7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The binary Search algorithm is fast but can be done only if the array is sorted. It checks the middle element if that is the element that is being searched for. If the search&lt;br&gt;
element is bigger than the middle element, the lower bound is set to the middle element plus one. If the search element is less than the middle element, the higher bound is set to&lt;br&gt;
the middle element minus one.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
