<p>Given a string <code>s</code>, you&nbsp;can transform every letter individually to be lowercase or uppercase to create another string.</p>

<p>Return <em>a list of all possible strings we could create</em>. Return the output in <strong>any order</strong>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> s = &quot;a1b2&quot;
<strong>Output:</strong> [&quot;a1b2&quot;,&quot;a1B2&quot;,&quot;A1b2&quot;,&quot;A1B2&quot;]
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> s = &quot;3z4&quot;
<strong>Output:</strong> [&quot;3z4&quot;,&quot;3Z4&quot;]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 12</code></li>
	<li><code>s</code> consists of lowercase English letters, uppercase English letters, and digits.</li>
</ul>

class Solution {
public:

   void function(string s, string st,vector<string>&result, int i)
   {
    if(i>=s.size())
    {
        result.push_back(st);
        return;
    } 
    if(!((s[i]>=65 && s[i]<=90) || (s[i]>=97 && s[i]<=122)))
    {
        //matlab digit alphabet to nhi hain to store karo aur aage badho
         st.push_back(s[i]);
         function(s,st,result,i+1);

    }
    else if(s[i]>=65 && s[i]<=90){
        //matlab capital letter mile toh use small bana do
    st.push_back(s[i]);
    function(s,st,result,i+1);
    st.pop_back();
    cout<<("s[i]+32")<<" ";
    st.push_back(s[i]+32);
    function(s,st,result,i+1);
    }

    else{
        //agar small letter mile toh use capital bana do.
    st.push_back(s[i]);
    function(s,st,result,i+1);
    st.pop_back();
    cout<<(s[i]-32)<<" ";
    st.push_back(s[i]-32);
    function(s,st,result,i+1);
    }
    return;    
   }


    vector<string> letterCasePermutation(string s) {
        vector<string>result;
        string st;
        function(s,st,result,0);
        return result;
    }
};
15300