<?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: Ganga Sri V</title>
    <description>The latest articles on DEV Community by Ganga Sri V (@ganga_sriv_b9bfb61d71007).</description>
    <link>https://dev.to/ganga_sriv_b9bfb61d71007</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%2F3838185%2Fe60442e4-c275-49c6-846b-d1558f750c26.png</url>
      <title>DEV Community: Ganga Sri V</title>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ganga_sriv_b9bfb61d71007"/>
    <language>en</language>
    <item>
      <title>Filter Assignments</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Tue, 31 Mar 2026 18:02:09 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/filter-assignments-54cg</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/filter-assignments-54cg</guid>
      <description>&lt;p&gt;&lt;strong&gt;1.Find all movies where the special features are not listed (i.e., special_features is NULL).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE special_features IS NULL;&lt;/p&gt;

&lt;p&gt;output:&lt;br&gt;
title&lt;br&gt;
Academy Dinosaur&lt;br&gt;
Ace Goldfinger&lt;br&gt;
Adaptation Holes&lt;br&gt;
Affair Prejudice&lt;br&gt;
African Egg&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Find all movies where the rental duration is more than 7 days.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, rental_duration FROM film WHERE rental_duration &amp;gt; 7;&lt;/p&gt;

&lt;p&gt;output:&lt;br&gt;
title | rental_duration&lt;br&gt;
---------------------+-----------------&lt;br&gt;
Alamo Videotape | 8&lt;br&gt;
Brotherhood Blanket | 9&lt;br&gt;
Chicago North | 10&lt;br&gt;
Dragon Squad | 8&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Find all movies that have a rental rate of $4.99 and a replacement cost of more than $20.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, rental_rate, replacement_cost FROM film WHERE rental_rate = 4.99 AND replacement_cost &amp;gt; 20;&lt;/p&gt;

&lt;p&gt;output:&lt;br&gt;
title | rental_rate | replacement_cost&lt;br&gt;
--------------------+-------------+------------------&lt;br&gt;
Ace Goldfinger | 4.99 | 22.99&lt;br&gt;
Airport Pollock | 4.99 | 24.99&lt;br&gt;
Bright Encounters | 4.99 | 21.99&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Find all movies that have a rental rate of $0.99 or a rating of 'PG-13'.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, rental_rate, rating FROM film WHERE rental_rate = 0.99 OR rating = 'PG-13';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title | rental_rate | rating&lt;br&gt;
-------------------+-------------+--------&lt;br&gt;
Academy Dinosaur | 0.99 | PG&lt;br&gt;
Alien Center | 2.99 | PG-13&lt;br&gt;
Angels Life | 0.99 | PG-13&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Retrieve the first 5 rows of movies sorted alphabetically by title.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film ORDER BY title ASC LIMIT 5;&lt;/p&gt;

&lt;p&gt;output:&lt;br&gt;
title&lt;br&gt;
Academy Dinosaur&lt;br&gt;
Ace Goldfinger&lt;br&gt;
Adaptation Holes&lt;br&gt;
Affair Prejudice&lt;br&gt;
African Egg&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6) Skip the first 10 rows and fetch the next 3 movies with the highest replacement cost.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, replacement_cost FROM film ORDER BY replacement_cost DESC LIMIT 3 OFFSET 10;&lt;/p&gt;

&lt;p&gt;output:&lt;br&gt;
title | replacement_cost&lt;br&gt;
-------------------+------------------&lt;br&gt;
Anthem Luke | 24.99&lt;br&gt;
Apollo Teen | 24.99&lt;br&gt;
Arabia Dogma | 24.99&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7) Find all movies where the rating is either 'G', 'PG', or 'PG-13'.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, rating FROM film WHERE rating IN ('G', 'PG', 'PG-13');&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title | rating&lt;br&gt;
-------------------+--------&lt;br&gt;
Academy Dinosaur | PG&lt;br&gt;
Ace Goldfinger | G&lt;br&gt;
Alien Center | PG-13&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8) Find all movies with a rental rate between $2 and $4.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, rental_rate FROM film WHERE rental_rate BETWEEN 2 AND 4;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title | rental_rate&lt;br&gt;
-------------------+-------------&lt;br&gt;
Adaptation Holes | 2.99&lt;br&gt;
Alien Center | 2.99&lt;br&gt;
Apollo Teen | 3.99&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9) Find all movies with titles that start with 'The'.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE 'The%';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
The Matrix&lt;br&gt;
The Pianist&lt;br&gt;
The Others&lt;br&gt;
The Truman Show&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10) Find the first 10 movies with a rental rate of $2.99 or $4.99, a rating of 'R', and a title containing the word "Love".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title, rental_rate, rating FROM film WHERE rental_rate IN (2.99, 4.99) AND rating = 'R' AND title LIKE '%Love%' LIMIT 10;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title | rental_rate | rating&lt;br&gt;
-----------------+-------------+--------&lt;br&gt;
Crazy Love | 2.99 | R&lt;br&gt;
Dangerous Love | 4.99 | R&lt;br&gt;
Endless Love | 2.99 | R&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11) Find all movies where the title contains the % symbol.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE '%\%%' ESCAPE '\';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
100% Love&lt;br&gt;
50% Chance&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12) Find all movies where the title contains an underscore (_).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE '%_%' ESCAPE '\';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
Mission_Impossible&lt;br&gt;
Fast_Furious&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;13) Find all movies where the title starts with "A" or "B" and ends with "s".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE (title LIKE 'A%' OR title LIKE 'B%') AND title LIKE '%s';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
Angels Life&lt;br&gt;
Backwards Towns&lt;br&gt;
Brothers Dreams&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14) Find all movies where the title contains "Man", "Men", or "Woman".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE '%Man%' OR title LIKE '%Men%' OR title LIKE '%Woman%';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
Spider Man&lt;br&gt;
X Men United&lt;br&gt;
Wonder Woman&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;15) Find all movies with titles that contain digits (e.g., "007", "2", "300").&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title ~ '[0-9]';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
007 Bond&lt;br&gt;
300 Spartans&lt;br&gt;
2 Fast 2 Furious&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;16) Find all movies with titles containing a backslash ().&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE '%\%';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
Escape \ Reality&lt;br&gt;
Path \ Finder&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;17) Find all movies where the title does contain the words "Love" or "Hate".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE '%Love%' OR title LIKE '%Hate%';&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
Crazy Love&lt;br&gt;
Endless Love&lt;br&gt;
Hate Story&lt;br&gt;
Love Actually&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;18) Find the first 5 movies with titles that end with "er", "or", or "ar".&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SELECT title FROM film WHERE title LIKE '%er' OR title LIKE '%or' OR title LIKE '%ar' LIMIT 5;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
title&lt;br&gt;
Joker&lt;br&gt;
Creator&lt;br&gt;
Avatar&lt;br&gt;
Doctor&lt;br&gt;
Warrior&lt;/p&gt;

</description>
    </item>
    <item>
      <title>ALTER TABLE</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Tue, 31 Mar 2026 17:49:28 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/alter-table-2c15</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/alter-table-2c15</guid>
      <description>&lt;p&gt;&lt;strong&gt;1) You have a table customers with a column email that currently allows NULL values. Modify the table so that future entries must always have an email.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
ALTER TABLE customers ALTER COLUMN email SET NOT NULL;&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) In the users table, ensure that the username column is unique across all records using an ALTER statement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
ALTER TABLE users ADD CONSTRAINT unique_username UNIQUE (username);&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) In the products table, enforce that price must always be greater than 0 using an ALTER command.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
ALTER TABLE products ADD CONSTRAINT price_check CHECK (price &amp;gt; 0);&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Modify the orders table so that the status column defaults to 'pending' if no value is provided during insertion.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
ALTER TABLE orders ALTER COLUMN status SET DEFAULT 'pending';&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Alter the employees table by adding a new column salary such that It cannot be NULL It must always be greater than 10,000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
ALTER TABLE employees ADD COLUMN salary INT;&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;ALTER TABLE employees ALTER COLUMN salary SET NOT NULL;&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;ALTER TABLE employees ADD CONSTRAINT salary_check CHECK (salary &amp;gt; 10000);&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6) Modify the foreign key constraint between employees and departments so that when a department is deleted, all related employees are automatically removed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;/p&gt;

&lt;p&gt;ALTER TABLE employees ADD CONSTRAINT employees_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(id) ON DELETE CASCADE;&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7) In the accounts table, remove an existing CHECK constraint that enforces balance &amp;gt;= 0.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
ALTER TABLE accounts DROP CONSTRAINT accounts_balance_check;&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8) In the payments table, ensure that the combination of user_id and transaction_id is unique using an ALTER TABLE statement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer:&lt;/p&gt;

&lt;p&gt;ALTER TABLE payments ADD CONSTRAINT unique_user_transaction UNIQUE (user_id, transaction_id);&lt;br&gt;
ALTER TABLE&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Search in Rotated Sorted Array</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Tue, 31 Mar 2026 14:54:41 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/search-in-rotated-sorted-array-3c5d</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/search-in-rotated-sorted-array-3c5d</guid>
      <description>&lt;p&gt;&lt;strong&gt;My Approach Explanation:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.Firstly array is sorted then It was rotated so i used binary search because it search the elements by spliting it.&lt;br&gt;
2.At each step that I compare the elements so I can search in half of the array which is sorted.&lt;br&gt;
3.Its like if the target is in with the sorted half then I continue searching in that half otherwise I move to the other half of the array.&lt;br&gt;
4.This process continues until the target is found or it didn't element to search further.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Methods Used:&lt;/strong&gt;&lt;br&gt;
Binary Search&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftv64nqqo2s4uock9hgga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftv64nqqo2s4uock9hgga.png" alt=" " width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Sorting Algorithm:</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Mon, 30 Mar 2026 12:02:17 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/sorting-algorithm-1kpc</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/sorting-algorithm-1kpc</guid>
      <description>&lt;p&gt;We talk about some sorting algorithms like bubble sort, selection sort, insertion sort and merge sort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BUBBLE SORT&lt;/strong&gt;:&lt;br&gt;
Bubble sort is a sorting method. In this we compare two elements and swap them if they are in wrong order. This process repeats again and again until the array becomes sorted.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
[5, 1, 4, 2]&lt;br&gt;
In this array we use two for loops and search like fix one element in first for loop with that compare to the next elements in next for loop until it sorted or the first for loop reaches its end by using this we compare and sort with every possible pairs in that array.&lt;/p&gt;

&lt;p&gt;TIME COMPLEXITY:&lt;br&gt;
Time complexity is O(n²) because we use nested loops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECTION SORT:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Selection sort works by selecting minimum element in the array . It finds the smallest element from unsorted part then swaps the element from the  beginning of the unsorted array.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
[5, 4, 2, 1]&lt;/p&gt;

&lt;p&gt;In this it takes 1 because 1 is smallest then it swaps it with first element of unsorted array 5 and then take 2 and swaps with 4 like that it sort the array until it sorted. for searching the smallest element in the array I can use binary search because its more efficient then linear.&lt;/p&gt;

&lt;p&gt;TIME COMPLEXITY:&lt;br&gt;
Time complexity is O(n²) because it uses nested loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INSERTION SORT:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Insertion sort is a sorting algorithm that takes the element from the starting of the array then inserts into correct position of the array.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
[5, 2, 4, 6, 1, 3]&lt;/p&gt;

&lt;p&gt;first it takes two then compare with left side element is it lesser then it swifts like [2,5,4,6,1,3] then take the next element 4 then move to the left side of array and compare with elements then it goes to the correct position in it and then it takes 6 it compare with all elements in left but all of them are lower then it so it didn't inserted on left side of array it remains same &lt;/p&gt;

&lt;p&gt;It is continued until it reaches the end of the array once it reaches end of the array it already sorted.&lt;/p&gt;

&lt;p&gt;TIME COMPLEXITY:&lt;br&gt;
 Compared to other two sorts its more efficiency.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CREATE TABLES</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sat, 28 Mar 2026 11:15:28 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/create-tables-1nol</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/create-tables-1nol</guid>
      <description>&lt;p&gt;For all the question I just give the basic syntax to create the table but for especially question 7 it asks for combination of two columns to be unique that was give some difficulty for me.&lt;/p&gt;

&lt;p&gt;1.CREATE TABLE students(id INT PRIMARY KEY,name VARCHAR(50),age INT);&lt;br&gt;
CREATE TABLE&lt;/p&gt;

&lt;p&gt;2.CREATE TABLE employee(name VARCHAR(50) NOT NULL,email VARCHAR(50) NOT NULL,phone_number INT);&lt;br&gt;
CREATE TABLE&lt;/p&gt;

&lt;p&gt;3.CREATE TABLE users(user_name VARCHAR(100) UNIQUE,email VARCHAR(100) UNIQUE);&lt;br&gt;
CREATE TABLE&lt;/p&gt;

&lt;p&gt;4.CREATE TABLE products(price INT check(price&amp;gt;0), stock INT check(stock &amp;gt;= 0));&lt;br&gt;
CREATE TABLE&lt;/p&gt;

&lt;p&gt;5.CREATE TABLE orders(status VARCHAR(50) default 'pending', created_at timestamp default NOW() );&lt;br&gt;
CREATE TABLE&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;CREATE TABLE accounts(account_number INT UNIQUE NOT NULL,balance INT check(balance &amp;gt;= 0));&lt;br&gt;
CREATE TABLE&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CREATE TABLE enrollment(student_id INT,course_id INT, UNIQUE(course_id,student_id));&lt;br&gt;
CREATE TABLE&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CREATE TABLE departments(id INT PRIMARY KEY, name VARCHAR(100));&lt;br&gt;
CREATE TABLE&lt;br&gt;
postgres=# CREATE TABLE employees(name VARCHAR(100),department_id INT,FOREIGN KEY(department_id) REFERENCES departments(id));&lt;br&gt;
CREATE TABLE&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;9.ALTER TABLE employees&lt;br&gt;
DROP CONSTRAINT employees_department_id_fkey;&lt;br&gt;
ALTER TABLE&lt;br&gt;
postgres=# ALTER TABLE employees ADD FOREIGN KEY (department_id) REFERENCES departments(id) ON DELETE CASCADE ON UPDATE CASCADE;&lt;br&gt;
ALTER TABLE&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmnxl5s3sh386mxmfrwi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhmnxl5s3sh386mxmfrwi.png" alt=" " width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>IP Address and Subnetting</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Mon, 23 Mar 2026 15:15:43 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/ip-address-and-subnetting-1jj4</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/ip-address-and-subnetting-1jj4</guid>
      <description>&lt;p&gt;&lt;strong&gt;IP ADDRESS:&lt;/strong&gt;&lt;br&gt;
     Ip address its mostly like the identification number of the computer.&lt;br&gt;
     Its a address Of the Computer. There is two types of address : IPv4 and IPv6 in this we see IPv4&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STRUCTURE OF IP ADDRESS:&lt;/strong&gt; &lt;br&gt;
    The total length of IPv4 is 32 bits&lt;br&gt;
    They are separated in 4 blocks and each blocks contains 8 bits &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SUBNETTING:&lt;/strong&gt;&lt;br&gt;
    Subnetting means breaks the network into sub-networks which means that I break the 1 network into 4 subnetworks&lt;br&gt;
    In this we separate the IPv4 into 2 parts: Network part and host part&lt;br&gt;
    Network Part is gonna remain same for subnet only host part is gonna change for each machine in the subnet&lt;br&gt;
    Network part is gonna represent the whole subnet and the host part represent how many machines are allowed or maximum limit of the machines are connect to that subnet &lt;br&gt;
   That Network part and Host part can be defined by CIDR - Classless Inter Domain Routing that tells how many host or machines can connect to that specific subnet&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CIDR - Classless Inter Domain Routing:&lt;/strong&gt;&lt;br&gt;
    If I have a IP address like 12.0.9.15/24 in this 24 is CIDR that represents the network part of the subnet &lt;br&gt;
   24 bits are allocated for the network part so we can use remaining 8 bits for machines that I can connect 255 machines in that specific subnet.&lt;br&gt;
   Not Likely I can connect the whole 255 machines that 12.0.9.0/24 is for root and last IP address of that subnet also not given to the machine.&lt;/p&gt;

</description>
      <category>networking</category>
    </item>
    <item>
      <title>Merge two Sorted List</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sun, 22 Mar 2026 17:22:25 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/merge-two-sorted-list-59i6</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/merge-two-sorted-list-59i6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You are given the heads of two sorted linked lists list1 and list2.&lt;br&gt;
Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Approach:&lt;/strong&gt;&lt;br&gt;
1.First I start with a dummy node or temporary node that called temp and a pointer tail to build the merged list.&lt;br&gt;
2.Then I compare the current nodes of list1 and list2.&lt;br&gt;
3.Then I attach the smaller node to tail.next and move that list forward.&lt;br&gt;
4.Then I move tail forward after each attachment.&lt;br&gt;
5.After one list is empty, I attach the remaining nodes from the other list.&lt;br&gt;
6.Then I return temp.next as the head of the merged sorted list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7emig7c8ijjuu0ss02i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7emig7c8ijjuu0ss02i.png" alt=" " width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reverse the Array</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sun, 22 Mar 2026 17:15:33 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/reverse-the-array-1oa6</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/reverse-the-array-1oa6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;br&gt;
Reverse an array . Reversing an array means the elements such that the element becomes the , the element becomes and so on.&lt;/p&gt;

&lt;p&gt;arr[] = [1, 4, 3, 2, 6, 5]&lt;br&gt;
[5, 6, 2, 3, 4, 1]&lt;br&gt;
The first element moves to last position, the second element moves to second-last and so on.&lt;/p&gt;

&lt;p&gt;arr[] = [4, 5, 1, 2]&lt;br&gt;
[2, 1, 5, 4]&lt;br&gt;
The first element moves to last position, the second element moves to second last and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Approach:&lt;/strong&gt;&lt;br&gt;
1.First I start with two pointers that are left at the beginning and right at the end.&lt;br&gt;
2.Then I swap arr[left] with arr[right].&lt;br&gt;
3.Then I move left forward and right backward.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I repeat this until left is no longer less than right.&lt;/li&gt;
&lt;li&gt;Finally that I return the reversed array.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffn59wjsm3fi996vyd0u1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffn59wjsm3fi996vyd0u1.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Remove Duplicates from Sorted Linked List</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sun, 22 Mar 2026 17:09:22 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/remove-duplicates-from-sorted-linked-list-3nii</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/remove-duplicates-from-sorted-linked-list-3nii</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;br&gt;
 Given a singly linked list. The task is to remove duplicates (nodes with duplicate values) from the given list (if it exists).&lt;br&gt;
Note: Try not to use extra space. The nodes are arranged in a sorted way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Approach:&lt;/strong&gt;&lt;br&gt;
1.First I start with a pointer curr at the head of the linked list.&lt;br&gt;
2.Then I compare current node data with curr.next.data.&lt;br&gt;
3.If they are equal then I remove the next node by linking curr.next to curr.next.next.&lt;br&gt;
4.If they are not equal then I move current node forward.&lt;br&gt;
5.I repeat this until I reach the end of the list.&lt;br&gt;
6.Finally then I return the modified head.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5y24le42nb5e5c2t9jm7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5y24le42nb5e5c2t9jm7.png" alt=" " width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>beginners</category>
      <category>computerscience</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Reverse the Linked List</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sun, 22 Mar 2026 17:00:35 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/reverse-the-linked-list-6di</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/reverse-the-linked-list-6di</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;br&gt;
         You are given the head of a singly linked list. You have to reverse the linked list and return the head of the reversed list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Approach:&lt;/strong&gt;&lt;br&gt;
1.First I start with prev = None and curr = head.&lt;br&gt;
2.Then I store the next node in nxt to save the element for future purpose.&lt;br&gt;
3.Then I reverse the curr.next pointer to point to prev.&lt;br&gt;
4.Then I move prev and curr forward.&lt;br&gt;
5.Then I repeat until the end of the list.&lt;br&gt;
6.Finally, prev becomes the new head of the reversed list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Methods Used:&lt;/strong&gt;&lt;br&gt;
Reversed pointers&lt;br&gt;
Three pointers&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Favnb2ntaosr2ttxcvlug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Favnb2ntaosr2ttxcvlug.png" alt=" " width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>beginners</category>
      <category>computerscience</category>
      <category>dsa</category>
    </item>
    <item>
      <title>Majority Element</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sun, 22 Mar 2026 16:46:39 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/majority-element-2knj</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/majority-element-2knj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;br&gt;
         Given an array arr[]. Find the majority element in the array. If no majority element exists, return -1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Approach:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.First I try to find a candidate the variable a for majority using a pattern.&lt;br&gt;
2.I keep b to track how many times the candidate is supported.&lt;br&gt;
3.If b becomes 0 then I pick the current number as a new candidate.&lt;br&gt;
4.I increase b if the current number is the a else I decrease b.&lt;br&gt;
5.After the one pass then I verify a by counting its total occurrences.&lt;br&gt;
6.If it occurs more than n/2 times then I return it otherwise I return -1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Methods Used:&lt;/strong&gt;&lt;br&gt;
Boyer-Moore Voting Algorithm&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkivnbgendvohnz4vhipk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkivnbgendvohnz4vhipk.png" alt=" " width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>computerscience</category>
      <category>dsa</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>First and Last Occurrences</title>
      <dc:creator>Ganga Sri V</dc:creator>
      <pubDate>Sun, 22 Mar 2026 16:35:54 +0000</pubDate>
      <link>https://dev.to/ganga_sriv_b9bfb61d71007/first-and-last-occurrences-18o2</link>
      <guid>https://dev.to/ganga_sriv_b9bfb61d71007/first-and-last-occurrences-18o2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;br&gt;
  Given a sorted array arr with possibly some duplicates, the task is to find the first and last occurrences of an element x in the given array.&lt;br&gt;
Note: If the number x is not found in the array then return both the indices as -1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Approach:&lt;/strong&gt;&lt;br&gt;
1.To find the first Occurance I search the required element in the beginning of the array if I find the element then consider the index for first and Last Occurance.&lt;br&gt;
2.If not then I return as -1&lt;br&gt;
3.for finding last element I search for the element in the reverse order of ther array if the first element of array is not the last element of the array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Methods Used:&lt;/strong&gt;&lt;br&gt;
Linear Search&lt;br&gt;
Conditional Check&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frklj9dl12bsrpyxkwv28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frklj9dl12bsrpyxkwv28.png" alt=" " width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

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