<?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: Tejaswini</title>
    <description>The latest articles on DEV Community by Tejaswini (@powercoder).</description>
    <link>https://dev.to/powercoder</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%2F492117%2Fecd27471-a1b9-4cb6-8e72-e0506f332b42.png</url>
      <title>DEV Community: Tejaswini</title>
      <link>https://dev.to/powercoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/powercoder"/>
    <language>en</language>
    <item>
      <title>Your next Mini Project using dev.to api</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Thu, 14 Jan 2021 05:11:38 +0000</pubDate>
      <link>https://dev.to/powercoder/your-next-mini-project-using-dev-to-api-2ei9</link>
      <guid>https://dev.to/powercoder/your-next-mini-project-using-dev-to-api-2ei9</guid>
      <description>&lt;ul&gt;
&lt;li&gt;I used dev.to api to display my blogs on my portfolio.&lt;/li&gt;
&lt;li&gt;Recently when I participated in a hackathon I used to to display the user's blogs along with search bar.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let btnDev=document.querySelector('#devbtn')

     fetch('https://dev.to/api/articles?username=powercoder')
    .then((response)=&amp;gt;

            response.json()
        )
    .then(data=&amp;gt;{
        let output='';
        data.forEach((element)=&amp;gt;
        {
            console.log(element)
           output+=
            `       &amp;lt;div id="grid-item"&amp;gt;
                    &amp;lt;div&amp;gt;
                    &amp;lt;h4 class="titleblog"&amp;gt;${element.title}    &amp;lt;i class="fas fa-heart text-danger"&amp;gt;&amp;lt;/i&amp;gt;${element.positive_reactions_count}&amp;lt;/h4&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;div&amp;gt;
                    &amp;lt;a href=${element.canonical_url}&amp;gt;&amp;lt;button class="btnc"&amp;gt;Read more&amp;lt;/button&amp;gt;&amp;lt;/a&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt; 
            `


        }
    )
    document.querySelector('#grid-container').innerHTML=output;
    })
            .catch(err =&amp;gt; console.log(err));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The above code snippet is used to fetch your blogs whenever you click the link of a button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;So first use DOM manipulation to fetch the button whenever you click it you get blogs of yours. Then I used fetch api to fetch the blogs and it returns a promise which resolves to a response which is either successful or not.&lt;/li&gt;
&lt;li&gt;So after the response convert into json format and then it returns an array of blogs written by the user.&lt;/li&gt;
&lt;li&gt;I used grid and some HTML to display my blogs along with likes and heading.&lt;/li&gt;
&lt;li&gt;The below picture is reference from my portfolio where I used dev.to to fetch blogs.&lt;/li&gt;
&lt;/ul&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%2Ffd83y5a7pxq4hub7i48a.JPG" 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%2Ffd83y5a7pxq4hub7i48a.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You can do this in react also it is a very good project to understand basics of react where you can create a search box and you can search for blogs of different users.&lt;br&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%2Fwhmkznt84j6p382a39rq.JPG" 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%2Fwhmkznt84j6p382a39rq.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can check the below project for reference. &lt;a href="https://github.com/tejaswini22199/DevFolio" rel="noopener noreferrer"&gt;https://github.com/tejaswini22199/DevFolio&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>portfolio</category>
      <category>javascript</category>
      <category>html</category>
    </item>
    <item>
      <title>Everything About Hackathons-A place where your ideas become actions</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Sat, 21 Nov 2020 11:25:32 +0000</pubDate>
      <link>https://dev.to/powercoder/everything-about-hackathons-a-place-where-your-ideas-become-actions-19p4</link>
      <guid>https://dev.to/powercoder/everything-about-hackathons-a-place-where-your-ideas-become-actions-19p4</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3CQH-xGN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k2yowjbzr1xedmac7qpz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3CQH-xGN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k2yowjbzr1xedmac7qpz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Hackathons?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Since Hackathons have time restrictions. You have to do the project within the given time and without procrastinating your work.&lt;/li&gt;
&lt;li&gt;It will help you network with students from other colleges and know about them. Also, you can get guidance from many mentors and working Professionals during Hackathons.
Hackathons will reveal the inner you, the talent in you. Since you will be choosing your idea from the given topics, you will be thinking out of the box creatively.&lt;/li&gt;
&lt;li&gt;Another advantage is, you can enhance your skills in collaboration and Team making, as you work with others during the hackathon.&lt;/li&gt;
&lt;li&gt;Some companies hire students through hackathons if they find your project creative.&lt;/li&gt;
&lt;li&gt;Last but not least, if you make it into the final round it will be a good achievement in your resume/Portfolio as well as you will get rewards.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Do’s and Don’ts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When I attended my first hackathon recently, I observed a few things which I want you to know if you are a newbie to Hackathons.
Choose a team that is willing to learn and do something. Because your team must not be quitting during the hack due to pressure.
Be proficient in at least one tech stack. (ML, WEBDEV, ANDROID)&lt;/li&gt;
&lt;li&gt;If you are a newbie, choose a small idea but a creative one that was not implemented before(something that is unique). Because there is time constraint choosing a complicated or big project may not give you output within time.&lt;/li&gt;
&lt;li&gt;Brainstorm your ideas with your teammates, If you know the theme before itself and try to divide the work among your self and try to know the resources for your hack.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Some of the websites where hackathons are being conducted
&lt;/h3&gt;

&lt;p&gt;2021 Season Schedule&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mlh.io/seasons/2021/events"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MLH hosts many hackathons across the globe. They also collaborate with top-notch companies. And they organize webinars with working professionals. They also provide you necessary stuff that you can use during the hackathon. Like, free credits for deploying your website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hackerearth.com/challenges/"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hacker earth organizes hackathons actively where you can get benefits like FTE and Intern opportunities too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.techgig.com/home"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tech gig is another website where hackathons are conducted.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://devfolio.co/"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Devfolio is another website where you can find hackathons.
That’s it guys. Hope you liked the content. Start applying if you want to upskill.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;WRITTEN BY&lt;br&gt;
Tejaswini&lt;br&gt;
Follow me for more such content&lt;/p&gt;

</description>
      <category>programming</category>
      <category>techtalks</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Starter Templates for Hackathons and other Resources</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Fri, 20 Nov 2020 17:12:50 +0000</pubDate>
      <link>https://dev.to/powercoder/starter-templates-for-hackathons-and-other-resources-7f8</link>
      <guid>https://dev.to/powercoder/starter-templates-for-hackathons-and-other-resources-7f8</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/sahat/megaboilerplate"&gt;https://github.com/sahat/megaboilerplate&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/react-boilerplate/react-boilerplate"&gt;https://github.com/react-boilerplate/react-boilerplate&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sahat/hackathon-starter"&gt;https://github.com/sahat/hackathon-starter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Learn any one of the frame works or fields like ML,WEB DEVELOPMENT ,ANDROID DEVELOPMENT, Game Development so that you can start working on something during hackathons. Learn one language like c++,Java,python,Java Script. etc.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>Good code Practices</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Tue, 27 Oct 2020 14:56:34 +0000</pubDate>
      <link>https://dev.to/powercoder/good-code-practices-jnf</link>
      <guid>https://dev.to/powercoder/good-code-practices-jnf</guid>
      <description>&lt;p&gt;Recently I learned a few best code practices, and I want to share them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you are writing a function multiple times that may cause buffer overflow. So the better practice is to store the function value and reuse it again.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int main()
{
    int size;
    cin&amp;gt;&amp;gt;size;
    vector&amp;lt;int&amp;gt; arr(size);
    for(int i=0;i&amp;lt;arr.size();i++)
    cin&amp;gt;&amp;gt;arr[i];
    for(int i=0;i&amp;lt;arr.size();i++)
    {
      if(arr[i]==*max_element(arr.begin(),arr.end()))
      {
        max_index=i;
        break;
      }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In the above code instead of using the function arr.size() and max_element we can just store them in a variable and use it.&lt;/li&gt;
&lt;li&gt;The naming of variables and functions:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So while you are naming any variable or function, use a name in such a way that others who see your code will understand what it is doing without prior knowledge of that language. I think many companies also follow this rule from what I heard.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Don't write complicated code. Make use of other alternative ways that are simple and easy to understand. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use separate functions for different issues so that we can enhance the code reusability factor of object-oriented programming instead of writing all the functionality in the main function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object oriented programming principles are best ones to follow so that the code can be modified or extended by others later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At the end but most important is to write efficient code in terms of time and space by using appropriate algorithms and data structures.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;Note: I collected these from various sources, Feel free to add more in the comments so that others can learn! Happy Learning&lt;/code&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>codequality</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Rest, Spread and Destructuring in JavaScript</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Mon, 19 Oct 2020 20:16:28 +0000</pubDate>
      <link>https://dev.to/powercoder/rest-spread-and-destructuring-in-javascript-107m</link>
      <guid>https://dev.to/powercoder/rest-spread-and-destructuring-in-javascript-107m</guid>
      <description>&lt;ul&gt;
&lt;li&gt;In java script rest , spread and destructuring are introduced to reduce the number of lines of code which are very useful for developers to minimize number of lines of code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Rest
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Rest combines all the given numbers or anything into an array.&lt;/li&gt;
&lt;li&gt;For example, &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to find sum of 5 numbers&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function sum1(...arr)
{
    let sum=0;
    for(let i=0;i&amp;lt;arr.length;i++)
    sum=sum+arr[i];
    return sum;
}
console.log(sum1(1,2,3,4,5));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another Example&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given array of numbers sort the array&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const arr1=(...arr)=&amp;gt;{
    let i,j;
    for(i=0;i&amp;lt;arr.length;i++)
    {
        for(j=0;j&amp;lt;arr.length-i;j++)
        {
            if(arr[j]&amp;gt;arr[j+1])
            {
                let temp=arr[j];
                arr[j]=arr[j+1];
                arr[j+1]=temp;
            }
        }
    }
    return arr;
}
console.log(arr1(3,2,4,1,5));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Spread
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Spread can be used to split multiple elements that are combined&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;

&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let day1 = [ "1", "2" ];
let day2 = [ "3", "4" ];

let combined = [ "0", ...day1, ...day2 ];
let combined1 = ["0",day1,day2];
console.log (combined);
console.log(combined1);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Output&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;[0,1,2,3,4]&lt;/code&gt;&lt;br&gt;
&lt;code&gt;[0,[1,2],[3,4]]&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To find maximum of given numbers&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let findMax=(...arr)=&amp;gt;
{
    arr.sort;
    return arr[arr.length-1];
}
console.log(findMax(1,2,3,4));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Destructuring
&lt;/h3&gt;

&lt;p&gt;It is used to reduce the code by dividing the arguments of a structure&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var student={
    name:'xyz',
    subject:'ec',
    cgpa:'10',
}
let res=(student)=&amp;gt;
{
   let{name,subject,cgpa}=student; //Here we are directly assigning to split
    return `Hi this is ${name},from ${subject} branch with cgpa of ${cgpa}`;
}
console.log(res(student));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Without destructuring
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let res=(student)=&amp;gt;
{
   name=student.name;
   subject=student.subject;
   cgpa=student.cgpa;
 //Here more lines of code
    return `Hi this is ${name},from ${subject} branch with cgpa of ${cgpa}`;
}
console.log(res(student));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Destructuring in function argument
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function greetings ({ name, subject,cgpa}) {
    return `Hi, I am ${name}.
        from ${subject} branch
        with cg of ${cgpa}`;
}
console.log(greetings(studentDetails));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Source where I learned: &lt;a href="https://github.com/MadhavBahl/dailyjs"&gt;link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>computerscience</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Bit Manipulation</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Sun, 18 Oct 2020 17:48:53 +0000</pubDate>
      <link>https://dev.to/powercoder/bit-manipulation-5b11</link>
      <guid>https://dev.to/powercoder/bit-manipulation-5b11</guid>
      <description>&lt;h1&gt;
  
  
  Daily learning
&lt;/h1&gt;

&lt;p&gt;Today I learned few tricks in bit Manipulation and I want to share the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Important formulae
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To do Left Shift of x by y bits &lt;code&gt;x&amp;lt;&amp;lt;y&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To do right shift of x by y bits &lt;code&gt;x&amp;gt;&amp;gt;y&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;xor is useful if you want to find non-repeating elements when all others are appearing twice. You can just xor all elements to find unique element.&lt;/li&gt;
&lt;li&gt;To check if a number is power of 2, You can do number&amp;amp;(number-1) if it is zero then it is power of 2 else not a power of 2.&lt;/li&gt;
&lt;li&gt;To find if ith lowest significant bit is set or not (n&amp;amp;(1&amp;lt;&amp;lt;i))
&lt;code&gt;Power of 2 : 2,4,8,16,...&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bit Manipulation is very useful when you have space constraints because we can reduce the space complexity using this.&lt;/p&gt;

&lt;h3&gt;
  
  
  -----------------------------------------------------------
&lt;/h3&gt;

&lt;p&gt;To generate subsequences of a string which are palindromes&lt;br&gt;
First task is to generate subsequences(It is part of string after removing some characters).Next is to check if it is palindrome or not.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step1 : Find the length of the string. Now we need to generate 2 power length number of subsequences and check if they form a palindrome or not.&lt;/li&gt;
&lt;li&gt;Step 2: So generate all the numbers from 0 to 2 power n&lt;/li&gt;
&lt;li&gt;Step 3: Now we need generate subsequences. To do that if we need to assume the number as representation of subsequence where zero tells that character in the string is not part of subsequence 1 tells that character of string is part of subsequence. So what are 0 and 1&lt;/li&gt;
&lt;li&gt;step 4:They are binary representation of string that we have taken so we need to convert each number into binary first then we can just add that character to the temporary string wherever 1 is present and we can check if it is palindrome or not.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Generate palindromic Subsequences from a given string &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Code for the question
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;bits/stdc++.h&amp;gt;
using namespace std;
bool ispalindrome(string s)
{
    int i=0;
    int j=s.length()-1;
    while(i&amp;lt;j)
    {
        if(s[i]==s[j])
        {
            i++;
            j--;
        }
        else
        return false;
    }
    return true;
}
int main()
{
    int t;
    cin&amp;gt;&amp;gt;t;
    while(t--)
    {
        string s;
        cin&amp;gt;&amp;gt;s;
        int count=0;
        int n=s.length();
        for(int i=0;i&amp;lt; (1&amp;lt;&amp;lt;n);i++) //it will generate pow(2,n) subsequences
        {
            string temp="";
            for(int j=0;j&amp;lt;n;j++)
            {
                int x=(1&amp;lt;&amp;lt;j);
                if((x&amp;amp;i)!=0)
                {
                //  cout&amp;lt;&amp;lt;s[j];
                    temp+=s[j];
                }
            }
            //cout&amp;lt;&amp;lt;endl;
            if(temp!="")
            {
                //cout&amp;lt;&amp;lt;temp&amp;lt;&amp;lt;endl;
                if(ispalindrome(temp))
                count++;
            }
        }
        cout&amp;lt;&amp;lt;(count+1)&amp;lt;&amp;lt;endl;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Question Source: &lt;code&gt;Hackerearth&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.hackerearth.com/problem/algorithm/chotu-and-sabrina-1/"&gt;Link&lt;/a&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Another application of Bit Manipulation is when you are given few numbers and you need to check sum of the difference in bits between any two numbers. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;For Example: 3 2 4  011 010 100 answer is 12&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Code for question
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;vector&amp;gt;
# include &amp;lt;cstring&amp;gt;
using namespace std;

int main() {
    // your code goes here
    int t;
    cin&amp;gt;&amp;gt;t;
    for(int k=1;k&amp;lt;=t;k++)
    {

        int n;
        cin&amp;gt;&amp;gt;n;
        vector&amp;lt;int&amp;gt; arr(n);
        for(int i=0;i&amp;lt;n;i++)
        cin&amp;gt;&amp;gt;arr[i];
        int bitset[32];
        memset(bitset,0,sizeof(bitset));
        for(int i=0;i&amp;lt;32;i++)
        {
            for(int j=0;j&amp;lt;n;j++)
            {
                int x=(1&amp;lt;&amp;lt;i);
                if(arr[j]&amp;amp;x)
                bitset[i]++;
            }
        }
        long long int res=0;
        for(int i=0;i&amp;lt;32;i++)
        {
            res+=bitset[i]*(n-bitset[i]);
            if(res&amp;gt;10000007)
            res=res%10000007;
        }
        res=2*res;
        if(res&amp;gt;10000007)
        res=res%10000007;
        cout&amp;lt;&amp;lt;"Case "&amp;lt;&amp;lt;k&amp;lt;&amp;lt;": ";
        cout&amp;lt;&amp;lt;res&amp;lt;&amp;lt;endl;
    }
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Question Source:SPOJ&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.spoj.com/problems/BITDIFF/"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source : &lt;a href="https://www.youtube.com/watch?v=md2Bn0zK6sc"&gt;link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cpp</category>
    </item>
    <item>
      <title>Git-Hub Commands that are useful for beginners who want to contribute to the Open Source!!!</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Sat, 17 Oct 2020 14:11:14 +0000</pubDate>
      <link>https://dev.to/powercoder/git-hub-commands-that-are-useful-for-beginners-who-want-to-contribute-to-the-open-source-2i28</link>
      <guid>https://dev.to/powercoder/git-hub-commands-that-are-useful-for-beginners-who-want-to-contribute-to-the-open-source-2i28</guid>
      <description>&lt;p&gt;Before going to that let us understand what is Git-hub. What is the difference between Git and Git-Hub, GIT is version control system which is used to track changes in the files where as Github is a software which enables you to manage your git repositories.&lt;/p&gt;

&lt;h1&gt;
  
  
  Commands
&lt;/h1&gt;

&lt;p&gt;When you want to store a folder that is present in your local computer to the git hub which is cloud based software you need to initialize a git repository first.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;git init: This Command is used to initialize repository in your local folder but it is invisible (stored as .git file)
If you want to contribute to any other repository, you should first fork that repository into your account. For that, you can directly click the fork symbol using the UI of Git-hub.&lt;/li&gt;
&lt;li&gt;git clone: To download your repository in your local machine.
You need to have a branch for each of the issue that you are solving so you need to create a branch.
Go to the file location using command prompt or git-bash.&lt;/li&gt;
&lt;li&gt;git branch : It displays all branches of that repository.&lt;/li&gt;
&lt;li&gt;git branch newb : Creates new branch names newb&lt;/li&gt;
&lt;li&gt;git checkout newb : Used to switch branch to newb
So now you can start modifying that repository in your local machine.
After you modify to check the status &lt;/li&gt;
&lt;li&gt;git status: Used to check the untracked files or un committed files
Every time to you need to keep your local repository updated from where you forked because many developers will be working on same repository so you need to get updates that are merged to the repository. To do that &lt;/li&gt;
&lt;li&gt;git remote add upstream &lt;code&gt;link of source repo&lt;/code&gt;: which will add the repository from where you cloned as remote(remote is repo in which you want to contribute).&lt;/li&gt;
&lt;li&gt;git add . : It is used to add the files to the state which we want to track the changes&lt;/li&gt;
&lt;li&gt;git commit -m "Add a meaningful message which describes your changes" : It is used to add the changes to your local repository&lt;/li&gt;
&lt;li&gt;git push origin &lt;code&gt;branch name&lt;/code&gt; : It is used to push your files into local repository.
Now you can create pull request by going to your repository in git Hub and the maintainers will be able to merge your branch if it doesn't have any conflicts. &lt;/li&gt;
&lt;li&gt;git branch -d &lt;code&gt;branch name&lt;/code&gt; : To delete a branch &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>beginners</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>How Hacktoberfest helped me in getting started with opensource!</title>
      <dc:creator>Tejaswini</dc:creator>
      <pubDate>Fri, 16 Oct 2020 20:46:02 +0000</pubDate>
      <link>https://dev.to/powercoder/how-hacktoberfest-helped-me-in-getting-started-with-opensource-57jp</link>
      <guid>https://dev.to/powercoder/how-hacktoberfest-helped-me-in-getting-started-with-opensource-57jp</guid>
      <description>&lt;h2&gt;
  
  
  What I Learned From Hacktoberfest
&lt;/h2&gt;

&lt;p&gt;Hello Everyone, Before participating in this event, I used to have basic knowledge about GitHub. After participating in Hacktoberfest, I learned many things related to Git-hub and also contributed to some repositories. I'll be continuing my contribution to the Open-Source in the future too. It is a great opportunity where students can brush up their technical skills along with building their Team player capabilities. My interest in Open Source is growing day by day. And this is just beginning only.&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
