<?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>Forem: Priya Srivastava</title>
    <description>The latest articles on Forem by Priya Srivastava (@priya730).</description>
    <link>https://forem.com/priya730</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%2F462850%2F7959c4da-986d-4815-8f47-ef0a7ff0cba2.jpeg</url>
      <title>Forem: Priya Srivastava</title>
      <link>https://forem.com/priya730</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/priya730"/>
    <language>en</language>
    <item>
      <title>Unveiling the Hype: What Are Vector Databases and Why They're the Talk of the Town!</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Wed, 14 Jun 2023 15:46:23 +0000</pubDate>
      <link>https://forem.com/priya730/unveiling-the-hype-what-are-vector-databases-and-why-theyre-the-talk-of-the-town-38j3</link>
      <guid>https://forem.com/priya730/unveiling-the-hype-what-are-vector-databases-and-why-theyre-the-talk-of-the-town-38j3</guid>
      <description>&lt;p&gt;Vector databases provide the backbone for the effective functioning of &lt;strong&gt;generative AI and LLMs&lt;/strong&gt; by facilitating seamless access to and retrieval of similar data representations. By organizing and indexing vectors, vector databases provide the foundation for these advanced AI models to generate more accurate and contextually relevant outputs, making them an essential component in the world of generative AI and LLMs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Vector Databases? Let's Get Nerdy!
&lt;/h2&gt;

&lt;p&gt;Alright, let's break it down. Vector databases are like the superheroes of data management. They don their capes, equipped with advanced indexing and searching techniques, to tackle the ever-growing challenges of storing and retrieving information. Think of them as the Avengers of the data world, ready to save the day!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zVKxT-dH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hz0zcnuft22zrwq6yms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zVKxT-dH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hz0zcnuft22zrwq6yms.png" alt="Superhero of db" width="220" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Power of Vector Similarity Search: Finding Your Data Soulmates!
&lt;/h2&gt;

&lt;p&gt;Now, imagine you're on an online shopping spree. You find the perfect pair of shoes, and you want more options just like them. Enter vector databases! These databases excel at finding data points that are similar to your query vector. They're like your shopping soulmates, helping you discover products that match your preferences and enhancing your retail therapy experience.&lt;/p&gt;

&lt;p&gt;But wait, there's more! Vector databases can also work wonders in image recognition. They're like the Sherlock Holmes of databases, instantly identifying similar images or objects. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Need to find a photo of that hilarious cat you saw? Boom! The vector database will have it at your fingertips faster than you can say "meow."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_31R2M-A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1h1q0ixtcsjbbv5rybzj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_31R2M-A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1h1q0ixtcsjbbv5rybzj.png" alt="cat meme" width="750" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Vectorization: Turning Data into Supercharged Vectors!
&lt;/h2&gt;

&lt;p&gt;Now, let's talk about vectorization, the secret sauce that makes vector databases so powerful. It's like giving your data a superhero makeover! Vectorization involves transforming raw data into high-dimensional vectors that capture all the relevant features and relationships. It's like taking your everyday Clark Kent data and turning it into the Superman of vectors!&lt;/p&gt;

&lt;h2&gt;
  
  
  How Do Vector Databases Work? The Secret Sauce Revealed!
&lt;/h2&gt;

&lt;p&gt;Behind the scenes, vector databases rely on some serious technical wizardry. So, let's put on our data scientist hats and unravel the magic!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Q3VYrBUY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ez7w6qyemnby8fe97tpn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q3VYrBUY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ez7w6qyemnby8fe97tpn.png" alt="flowchart" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Vectorization - From Ordinary to Extraordinary!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The journey begins with vectorization, where raw data is transformed into high-dimensional vectors. It's like giving your data a superhero makeover—putting on the spandex and cape to become a mighty vector!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Indexing - Organizing the Vector Avengers!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the data is transformed into vectors, it's time to assemble the Vector Avengers—the indexing algorithms. These algorithms work tirelessly to organize the vectors in a way that enables efficient searching and retrieval. Think of them as the Hulk of organization, smashing through data chaos to bring order to the database universe!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Similarity Search - Finding Your Vector Soulmates!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now comes the fun part—similarity search! When you make a query, the vector database springs into action, comparing your query vector to the vectors stored in its mighty index. It's like a cosmic game of "Find the Most Similar Vector." The database quickly identifies the closest matches, bringing you one step closer to finding your data soulmates!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Ranking and Retrieval - Unleashing the Power of Order!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the similar vectors are found, the vector database sorts them in order of relevance. It's like having a ranking system that separates the Avengers from the sidekicks, ensuring that the most pertinent data is presented to you. With a snap of its metaphorical fingers, the database retrieves the top-ranked results, giving you the data you need, when you need it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Applications: Where Vector Databases Shine!
&lt;/h2&gt;

&lt;p&gt;Okay, let's see these vector databases in action, shall we?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Recommendation Systems: Picture this: You're binge-watching your favorite show, and suddenly, a recommendation pops up that perfectly matches your taste. Thanks to vector databases, personalized recommendations make streaming services feel like they have psychic powers. It's like they can read your mind (or your vectors)!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Image and Video Analysis: Imagine you're scrolling through an endless feed of images, trying to find that one elusive picture you saw last week. With vector databases, image searches become a breeze. They're like your personal detective, helping you find that lost picture faster than you can say "cheese."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fraud Detection: Let's face it, fraudsters are the villains of the financial world. But fear not! Vector databases are here to save the day. By analyzing patterns in transactions and comparing vectors, they can spot those sneaky anomalies and detect fraud faster than you can say "gotcha."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Biomedical Research: Vector databases are also heroes in the world of healthcare. They assist researchers in analyzing genomics data, protein structures, and drug discovery. It's like having a team of brilliant scientists by your side, working tirelessly to advance medical breakthroughs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Future Prospects: A Thrilling Data-Driven Tomorrow!
&lt;/h2&gt;

&lt;p&gt;Hold onto your hats because the future of vector databases is full of excitement! As research progresses, we can expect even more powerful vectorization techniques and lightning-fast indexing algorithms. The adoption of vector databases will skyrocket, leading to mind-blowing advancements in data analytics and artificial intelligence. It's like a superhero team-up that will reshape the future of technology!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Vector databases have ushered in a new era of data management, allowing us to unlock valuable insights from complex datasets efficiently. By harnessing the power of vector similarity search and leveraging advanced vectorization techniques, these databases have revolutionized the way we store, retrieve, and analyze data. As we continue to explore the vast potential of vector databases, we can anticipate groundbreaking advancements that will shape the future of data-driven decision-making across industries. So, go forth, unleash the power of vectors, and embrace the extraordinary potential of data!&lt;/p&gt;

</description>
      <category>vectordatabase</category>
      <category>ai</category>
      <category>chatgpt</category>
      <category>programming</category>
    </item>
    <item>
      <title>My Journey with React States: Common Mistakes I Made and How I Overcame Them</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Sat, 10 Jun 2023 15:44:11 +0000</pubDate>
      <link>https://forem.com/priya730/my-journey-with-react-states-common-mistakes-i-made-and-how-i-overcame-them-9bk</link>
      <guid>https://forem.com/priya730/my-journey-with-react-states-common-mistakes-i-made-and-how-i-overcame-them-9bk</guid>
      <description>&lt;p&gt;Throughout my journey with React and its state management, I encountered some common mistakes that many beginners, including myself, often make. However, I learned valuable lessons from these experiences and discovered effective solutions to overcome these challenges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to States in React:&lt;/strong&gt;&lt;br&gt;
In React, states are a crucial part of managing data within a component. They allow us to store and update values that can affect the rendering of our components. With the introduction of React hooks, specifically the &lt;code&gt;useState&lt;/code&gt; hook, managing states has become much easier. Let's explore some common problems beginners may encounter when working with states in React.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 1: Incorrectly Updating the State:&lt;/strong&gt;&lt;br&gt;
Suppose we have an &lt;code&gt;h1&lt;/code&gt; tag that displays a number, and we want to increase that number whenever a button is clicked. We can achieve this using the &lt;code&gt;useState&lt;/code&gt; hook. However, a common mistake is to directly update the state value without considering its previous state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setNumber&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;increaseNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Incorrect way: directly updating the state&lt;/span&gt;
    &lt;span class="nx"&gt;setNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;increaseNumber&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Increase&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem with the above code is that React batches state updates, and when we update the state using the &lt;code&gt;setNumber&lt;/code&gt; function, it may not reflect the latest value of &lt;code&gt;number&lt;/code&gt;. To solve this, we should use the functional update approach:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;increaseNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Correct way: using functional update&lt;/span&gt;
  &lt;span class="nx"&gt;setNumber&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prevNumber&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;prevNumber&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By passing a function to &lt;code&gt;setNumber&lt;/code&gt;, we ensure that we are updating the state based on the previous value. This guarantees that we are working with the latest state and avoiding unexpected behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 2: Handling Initialization:&lt;/strong&gt;&lt;br&gt;
Another mistake I stumbled upon was the initialization of states. Initially, I faced the dreaded "white screen" issue when trying to access properties of an undefined object. &lt;/p&gt;

&lt;p&gt;Let's consider an example where we have a &lt;code&gt;user&lt;/code&gt; state that should contain properties like &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt;, and &lt;code&gt;images&lt;/code&gt;. However, initially, we don't have this data, and accessing undefined properties can lead to errors.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setUser&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt;

&lt;span class="c1"&gt;// Trying to access undefined properties&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Username: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Email: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Profile Picture: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To avoid such errors, it's recommended to initialize the state with the expected type. For example, if the user is an object, we can initialize it as an empty object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setUser&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By providing initial values for the expected properties, we prevent the component from breaking when trying to access them before they are updated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 3: Updating a Specific Object Property:&lt;/strong&gt;&lt;br&gt;
Suppose we have a user object with properties like &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt;, and &lt;code&gt;images&lt;/code&gt;, and we want to update only the &lt;code&gt;name&lt;/code&gt; property based on user input. We may attempt to directly update the property, but this approach won't work.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;changeUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Incorrect way: not updating the property correctly&lt;/span&gt;
  &lt;span class="nx"&gt;setUser&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead, we should update the desired property while preserving the other properties using the spread operator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;changeUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Correct way: updating the property using spread operator&lt;/span&gt;
  &lt;span class="nx"&gt;setUser&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prevUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;prevUser&lt;/span&gt;

&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By spreading the previous state object &lt;code&gt;prevUser&lt;/code&gt; and modifying the specific property, we ensure that only the desired property is updated while keeping the rest unchanged.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 4: useState vs. useReducer:&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;useState&lt;/code&gt; hook is suitable for most state management needs, but for more complex cases involving nested objects, arrays, and multiple property updates, the &lt;code&gt;useReducer&lt;/code&gt; hook provides a better approach. Suppose we have a complex form where multiple inputs need to be managed and validated.&lt;/p&gt;

&lt;p&gt;In such scenarios, using &lt;code&gt;useReducer&lt;/code&gt; with separate actions and a reducer function can improve the organization and scalability of our state management. Although it involves more code, it provides better control over state transitions and reduces potential errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 5: Correctly Deriving States:&lt;/strong&gt;&lt;br&gt;
Suppose we have an array of items and want to store the selected item in the state. A common mistake is storing the entire object in the state, which can lead to inconsistencies if the source array changes. Instead, we should store an identifier (e.g., the item's ID) and retrieve the corresponding object from the array when needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;selectedItemId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setSelectedItemId&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;selectItem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;itemId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Incorrect way: storing the entire object&lt;/span&gt;
  &lt;span class="nx"&gt;setSelectedItemId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;itemId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Correct way: retrieving the object using the ID&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;selectedItem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;find&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;selectedItemId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By storing only the identifier and deriving the desired object from the array when necessary, we ensure that the derived state remains synchronized with the source state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
In conclusion, my journey with React states has been filled with valuable lessons. By addressing the mistakes I made and implementing the appropriate solutions, I gained a deeper understanding of state management in React. These experiences have not only improved my coding skills but also taught me the importance of careful consideration when working with states. I hope that by sharing my personal experiences, other beginners can learn from these mistakes and navigate their own React projects more effectively. Remember, making mistakes is a part of the learning process, and overcoming them leads to growth and mastery.&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>290. Word Pattern Leetcode Problem of The Day- 01 Jan 2023</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Sun, 01 Jan 2023 16:49:21 +0000</pubDate>
      <link>https://forem.com/priya730/290-word-patternleetcode-problem-of-the-day-01-jan-2023-9e1</link>
      <guid>https://forem.com/priya730/290-word-patternleetcode-problem-of-the-day-01-jan-2023-9e1</guid>
      <description>&lt;p&gt;Hello everyone! It is New year's first day and I have decided to document the questions I solve on Leetcode. This is to keep a record of my thought process of approaching questions and also to document my solutions in an organised manner. &lt;br&gt;
If you are reading this, hope the blog helps you as well. So here is how I approached the first question of Leetcode daily challenge.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://leetcode.com/problems/word-pattern/"&gt;Question link:&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Given a pattern and a string s, find if s follows the same pattern.&lt;/p&gt;

&lt;p&gt;Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;br&gt;
Input: pattern = "abba", s = "dog cat cat dog"&lt;br&gt;
Output: true&lt;/p&gt;




&lt;h1&gt;
  
  
  Intuition
&lt;/h1&gt;

&lt;p&gt;The problem states there are 2 strings and all I have to do is compare them such that every character of 'pattern' corresponds to the 'word' of String 's'.&lt;/p&gt;

&lt;p&gt;eg:&lt;br&gt;
  a -&amp;gt; dog &lt;br&gt;
    b -&amp;gt; cat&lt;br&gt;
    b -&amp;gt; cat&lt;br&gt;
    a -&amp;gt; dog &lt;br&gt;
(And vice versa)&lt;br&gt;
This statements brings us to the idea that we can use a hashmap to store word and character as key and value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approach
&lt;/h2&gt;

&lt;p&gt;All we need to do is map the word of s to the char of pattern and vice versa. Check if they correspond to the same thing using .equals()&lt;br&gt;
Base case: the length of pattern and number of words in s should be same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now code this!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How will I get the word?&lt;/em&gt; By using .split(" ")&lt;/p&gt;

&lt;h2&gt;
  
  
  Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Time complexity:&lt;/p&gt;



&lt;p&gt;O(n)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Space complexity:&lt;/p&gt;



&lt;p&gt;O(n)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Solution {
    public boolean wordPattern(String pattern, String s) {
        String[] word = s.split(" ");
        if(word.length != pattern.length()) return false;
        HashMap&amp;lt;Character, String&amp;gt; map1 = new HashMap&amp;lt;&amp;gt;();
        HashMap&amp;lt;String, Character&amp;gt; map2 = new HashMap&amp;lt;&amp;gt;();
        for(int i=0; i&amp;lt;pattern.length(); i++) {
            char c = pattern.charAt(i);
            String w = word[i];
            if(!map1.containsKey(c)){
                map1.put(c, w);
            }
            if(!map2.containsKey(w)) {
                map2.put(w, c);
            }
            if( (!map1.get(c).equals(w)) || (!map2.get(w).equals(c)) )
                return false;
        }
        return true;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>leetcode</category>
      <category>tutorial</category>
      <category>discuss</category>
      <category>java</category>
    </item>
    <item>
      <title>Essential Linux Commands for beginners</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Wed, 21 Dec 2022 05:46:33 +0000</pubDate>
      <link>https://forem.com/priya730/essential-linux-commands-for-beginners-3agh</link>
      <guid>https://forem.com/priya730/essential-linux-commands-for-beginners-3agh</guid>
      <description>&lt;h3&gt;
  
  
  To anyone getting started with Linux, check out these commands and make your life easier!
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ZTyEFCF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2732/1%2AY7550RGvIbLZDjUktNG26A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ZTyEFCF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2732/1%2AY7550RGvIbLZDjUktNG26A.png" alt="Use the command cmatrix to get this cool matrix. Have fun with Linux commands!" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  List (ls)
&lt;/h2&gt;

&lt;p&gt;Use the &lt;strong&gt;ls&lt;/strong&gt; command to display the files, along with all their properties, are in a directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Change directory (cd)
&lt;/h2&gt;

&lt;p&gt;It is often necessary to change directories. That’s the cd command's function. For instance, this example takes you from your home directory into the Desktop directory:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **cd** Desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To get back to the previous directory use:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **cd** ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3qxVgMou--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AaB4x9tItYwCP9t-ULqBFrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3qxVgMou--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AaB4x9tItYwCP9t-ULqBFrg.png" alt="" width="880" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Print working directory (pwd)
&lt;/h2&gt;

&lt;p&gt;The pwd command prints your working directory. In other words, it outputs the path of the directory you are currently working in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PXBX7AZc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AjML1zQASXLlNtfM3dKpC6Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PXBX7AZc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AjML1zQASXLlNtfM3dKpC6Q.png" alt="" width="446" height="58"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Make directory (mkdir)
&lt;/h2&gt;

&lt;p&gt;Making directories is easy with the mkdir command. The following command creates a directory called newfolder unless newfolder already exists:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **mkdir** newfolder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Copy a file (cp)
&lt;/h2&gt;

&lt;p&gt;Copy files &lt;em&gt;from-here&lt;/em&gt; *to-there *with the cp command. Here's an example to copy from file1.txt to file2.txt:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **cp** file1.txt file2.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Create an empty file (touch)
&lt;/h2&gt;

&lt;p&gt;Easily create an empty file with the touch command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **touch** newfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Escalate privileges (sudo)
&lt;/h2&gt;

&lt;p&gt;The sudo (or &lt;em&gt;super user do&lt;/em&gt;) command comes in when you require super user permissions (root) while administering your system. When you're trying to do something and your computer alerts you that only an administrator (or root) user can do, stating Permission denied, just preface it with the command sudo:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **touch** **/**etc**/**os-release **&amp;amp;&amp;amp;** **echo** "Success"
touch: cannot **touch** '/etc/os-release': Permission denied

$ **sudo** **touch** **/**etc**/**os-release **&amp;amp;&amp;amp;** **echo** "Success"
Success
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Read the manual (man)
&lt;/h2&gt;

&lt;p&gt;The single most important command that you will need to get the documentation for each of the commands on your Linux system is man .For instance, to read more about mkdir:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ **man** **mkdir**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Another similar command is info.&lt;/p&gt;

&lt;p&gt;Use these commands and keep learning and exploring! Thank you for reading this post, stay tuned for my next blog posts.&lt;br&gt;
You can find me on &lt;a href="https://twitter.com/shivikapriya"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/priyasrivastava730"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://github.com/priya730"&gt;Github&lt;/a&gt;.✨&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>bash</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Adobe India Women In Tech (WIT) Scholarship 2021 Essay and interview Experience</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Wed, 21 Dec 2022 05:38:10 +0000</pubDate>
      <link>https://forem.com/priya730/adobe-india-women-in-tech-wit-scholarship-2021-essay-and-interview-experience-1ah</link>
      <guid>https://forem.com/priya730/adobe-india-women-in-tech-wit-scholarship-2021-essay-and-interview-experience-1ah</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--98AdylpR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2402/1%2ABFM-lkaCYyS2r_NSmYe3fg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--98AdylpR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2402/1%2ABFM-lkaCYyS2r_NSmYe3fg.jpeg" alt="" width="880" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Adobe WIT scholarship is a scholarship opportunity for pre-final year femal students in a formal technology 4-year BE / B.Tech education program or an Integrated ME/MS/MTech program at an Indian University or Institute at the time of applying. Should be pursuing a Major or Minor in the following streams: Computer Science/Engineering, Information Science, Data Science, Electrical/Electronics Engineering, Math, and Computing. Source: Adobe WIT India official page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  It comprises of essays and interview as its two rounds of process.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.adobe.com/in/lead/creativecloud/women-in-technology.html"&gt;&lt;strong&gt;Adobe India Women-in-Technology Scholarship&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Essay experience:
&lt;/h2&gt;

&lt;p&gt;The essay questions consist of questions on your inspiration to join tech, your interests, any challenges you have faced or anticipate facing, your role models etc. Some things to keep in mind while preparing the essay are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Make your &lt;strong&gt;first draft&lt;/strong&gt; without any filters, write everything you think about the given topic and express it in the most &lt;strong&gt;honest&lt;/strong&gt; way possible. At this stage you should not be thinking about the word limit. From my experience: Don’t try to write things that you think the selectors might want to hear, don’t mould your thoughts to match some standards, write &lt;strong&gt;&lt;em&gt;your&lt;/em&gt;&lt;/strong&gt; story.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Remember, essays are for the selection committee to know you&lt;/strong&gt;, so make sure you do a good job telling about yourself. What inspires you? Why technology? Ask yourself such questions and answer for yourself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Now that you have your draft ready, it is time for editing!&lt;/strong&gt; Check for grammar, spelling errors. Don’t go for advance english and complicated words. Try to point out important lines and points and then trimming down your draft to match the word limit. You wrote everything you could write on the topic, your mind is very clear so you know how to shorten it down to a crisp, beautiful essay ;)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tip:&lt;/em&gt;&lt;/strong&gt; You can include a short video about yourself focusing on your interests, achievements and why do you deserve the scholarship.&lt;/p&gt;

&lt;p&gt;Some reviews I received and shared were:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;State the fact with supporting examples like I did this, built this using this tech etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Include why you chose engineering, tech you are working on right now, what do you want to do after graduation. For example, was it your childhood dream to be an engineer or someone inspired you. These days what tech do you feel I want to build if I had all the neccessary knowledge.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask yourself these questions, you’ll then be able to answer the essay honestly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also I recommend get someone else also reveiw your essays and resume, better to seek more inputs.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Don’t sound very generic.&lt;/strong&gt; Write things about yourself so that they get to know you as a person for eg. everyone applying is hard working, you need not mention it specifically, a better way to put it however can be a story from your life. Maybe take your JEE preparation as an example, tell them about how you spent time, faced challenges and then got into your college. That story makes you unique, you get the idea?&lt;/p&gt;

&lt;h2&gt;
  
  
  Interview Experience:
&lt;/h2&gt;

&lt;p&gt;I received interview invitation after my essay submissions. The interview was set up on 2 November 2021 with a technology specialist from Adobe. The interview was conducted on MS Teams by one of Adobe’s Research scientist.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FYHLcX1p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2160/0%2A68-g-WUPt0mfZ9hN" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FYHLcX1p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2160/0%2A68-g-WUPt0mfZ9hN" alt="" width="880" height="672"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My interview was more focused towards my projects and the tech stack I used. I shared my screen to show the hosted projects. I explained my inspiration for building the projects and the challenges I faced in the process. Other questions were based on the technical questions on the tech stack I mentioned. How will you implement a particular feature… and similar questions. Another question- what is the future plans for my projects?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You can cover your work experience, project and your interests for your introduction. PS: This is your first impression so prepare well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Know well about your projects. Why and what of the technology. Why did you build the project are some questions you can expect.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prepare behavioural questions and also know your essay very well. You can keep a printout of your resume and essay for your reference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be confident and own your accomplishments. Don’t take it as something to fear about. The interview is just a conversation about your interests and how well do you know about the skills you mentioned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask questions at the end of interview. Use this chance wisely. You could talk about your interests, work culture of the company, any research activities or innovations etc. You can take a look at the LinkedIn profile of your interviewer and discuss about their expertise. For eg. my interviewer was into ML, so we had a good discussion on the same at the end of the interview.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ftUJjI8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2160/0%2Aq50lyuqlM0HFfXmW" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ftUJjI8n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2160/0%2Aq50lyuqlM0HFfXmW" alt="So close yet so far💔" width="880" height="1446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though I didn’t ultimately receive the scholarship, I feel extremely grateful to have made it this far in the &lt;a href="https://www.linkedin.com/company/adobe/"&gt;Adobe&lt;/a&gt; WIT scholarship. I will definitely keep developing my technical skills and knowledge. There is no substitute for knowing technology at a deeper level.&lt;/p&gt;

&lt;p&gt;To all the young women in tech reading this, I encourage you to keep pushing your boundaries and doing wonderful work in the technology space. Keep applying, be proud of your achievements and apply to all the opportunities you get. Feel free to reach me on Twitter @ &lt;a href="https://www.twitter.com/shivikapriya"&gt;shivikapriya&lt;/a&gt; for any queries. Happy to help 😄🤝&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Like this post? Like and share this article with your friends.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Demystifying Git and GitHub</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Sun, 06 Dec 2020 06:33:45 +0000</pubDate>
      <link>https://forem.com/priya730/demystifying-git-and-github-1f66</link>
      <guid>https://forem.com/priya730/demystifying-git-and-github-1f66</guid>
      <description>&lt;p&gt;If you are new to software development and have wondered what git and Github essentially mean, then you are at the right place! As a developer, you will encounter these two terms quite frequently and use them too! Get an answer to what git and Github are, why would you need them, and are they different? 🤔&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Ccwab5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1607190123972/fELpUgShI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Ccwab5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1607190123972/fELpUgShI.png" alt="178-1787354_http-octodex-github-v2-github-octocat.png" width="820" height="779"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Putting things Simply&lt;/strong&gt;👀
&lt;/h2&gt;

&lt;p&gt;Let us assume that you have built a calculator that can add and subtract numbers, you show it to your friend and he says, “That’s great! How about adding some more features to it like multiplication and division?” So what you can do is you can &lt;em&gt;PUSH&lt;/em&gt; the implementation of the calculator, i.e., its code, on a hosting platform using ‘some tool’. On that platform, your friend can collaborate on the project and can introduce the code for multiplication or division. Using the tool again, you add the newly introduced code for multiplication or division. This will now be a new version of the calculator- the one with more features! So what hosting platform did you use here?** It is GITHUB- a website, a hosting service for your project.** Interestingly your project can now be called an Open Source project, or a Github repository! &lt;/p&gt;

&lt;p&gt;Imagine that the multiplication feature is not working properly for decimal numbers and you want to get back to your previous calculator version. Is this possible? Yes, it is possible, using ‘the tool’ you’ve been using till now. &lt;strong&gt;The tool is called GIT- a version control system.&lt;/strong&gt; It can allow you to get back to the previous version of your project, something like the undo button in MS Word! &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So GIT is installed in your local system whereas GITHUB is a hosting service- a website where you can share your project with others, giving them the power to make revisions or edits. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j4ht0ytk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1607190983662/A1BniO_Bp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j4ht0ytk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1607190983662/A1BniO_Bp.jpeg" alt="git1-1024x642.jpg" width="880" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that you know what git and GitHub are, you can go ahead and build some cool projects and collaborate with the projects of other programmers as well!👩‍💻&lt;/p&gt;

&lt;p&gt;So if you haven't already, then get a Github account, install git and get into some real action! May the source be with you!🌞&lt;/p&gt;

&lt;p&gt;Feel free to reach me on Twitter @ &lt;a href="https://www.twitter.com/shivikapriya"&gt;shivikapriya&lt;/a&gt; for any queries. Happy to help 😄🤝&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>opensource</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Data Structure and Algorithms: Linear Search</title>
      <dc:creator>Priya Srivastava</dc:creator>
      <pubDate>Wed, 18 Nov 2020 17:16:59 +0000</pubDate>
      <link>https://forem.com/priya730/data-structure-and-algorithms-linear-search-48g3</link>
      <guid>https://forem.com/priya730/data-structure-and-algorithms-linear-search-48g3</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;What is Searching?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In Computer Science, &lt;em&gt;searching&lt;/em&gt; is "the process of finding an item with specified properties from a collection of items." An item can be anything from a stored record or an array element to elements of other search spaces. &lt;/p&gt;

&lt;h2&gt;
  
  
  But why do we need Searching?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3g96utpxe2ezee0lquyg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3g96utpxe2ezee0lquyg.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The answer is- to find the data that you are looking for, from a large set of data. For example, finding your friend's phone number from a long contact list can be made easier using searching algorithms. Here the contact list is the &lt;em&gt;collection of items&lt;/em&gt; and your friend's number is the &lt;em&gt;data&lt;/em&gt; with the specified property.&lt;/p&gt;

&lt;p&gt;Some examples of searching algorithms are Linear Search, Binary Search, Interpolation Search, etc. Here we'll discuss Linear Search. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is Linear Search?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Linear search is a simple searching algorithm that checks every item in a collection sequentially. If the match is found the item is returned, otherwise the search continues till the end of the collection. &lt;br&gt;
Assume that you are given an array where the order of the elements is not known. In this case, you'll have to scan through each element of the array to find the element with the specified property. &lt;/p&gt;

&lt;p&gt;The Algorithm can be written like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Given an Array &lt;strong&gt;Arr&lt;/strong&gt; and Item to be found &lt;strong&gt;data&lt;/strong&gt;.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check the first element. If it is equal to data, return position of the first element. Else check for the next element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check until the last element is compared.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If data not found in the array, return -1.&lt;br&gt;
&lt;em&gt;This type of linear Search is called Unordered Linear Search&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;unorderedLinearSearch&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; 
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Time Complexity: O(n), in the worst case we scan the complete array.&lt;br&gt;
Space Complexity: O(1)&lt;/p&gt;

&lt;p&gt;Now, if the array Arr is sorted, i.e. we know the order of elements, we can perform the search as follows:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This case is called Ordered Linear Search&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;orderedLinearSearch&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nf"&gt;if&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
             &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; 
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can further optimize the time complexity for the cases when &lt;em&gt;data&lt;/em&gt; is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;at the last position in the array from O(n) to O(1) or,&lt;/li&gt;
&lt;li&gt;not present in the array, from O(n) to O(n/2)
by checking elements from left and right positions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;optimiseLinearSearch&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;left&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;left&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="o"&gt;;){&lt;/span&gt;

         &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;search_Element&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  
            &lt;span class="o"&gt;{&lt;/span&gt; 
                &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
                &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt; 
                &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
            &lt;span class="o"&gt;}&lt;/span&gt; 

         &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Arr&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;search_Element&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  
            &lt;span class="o"&gt;{&lt;/span&gt; 
                &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
                &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt; 
                &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
            &lt;span class="o"&gt;}&lt;/span&gt; 

            &lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="o"&gt;++;&lt;/span&gt; 
            &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="o"&gt;--;&lt;/span&gt; 
     &lt;span class="o"&gt;}&lt;/span&gt; 
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; 
            &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"data not found"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt; 
    &lt;span class="o"&gt;}&lt;/span&gt; 
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! Now you know what Searching Algorithms are and how the Linear Search algorithm is implemented. &lt;/p&gt;

&lt;p&gt;In the next blog, we'll be looking at a few more concepts of Data Structures and Algorithms!&lt;/p&gt;

&lt;p&gt;Connect with me&lt;br&gt;
&lt;a href="https://www.twitter.com/shivikapriya" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;br&gt;
&lt;a href="//www.linkedin.com/in/priyasrivastava730"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank You for Reading!😃&lt;/p&gt;

</description>
      <category>datastructure</category>
      <category>algorithms</category>
      <category>java</category>
      <category>linearsearch</category>
    </item>
  </channel>
</rss>
