MINI CHICKPEA FLOUR FRITTATAS (VEGAN)

side angle view of mini chickpea flour frittata muffins cooking on a wire rack.★★★★★4.7 from 14 reviews

Veggie filled and super easy to make, these chickpea flour frittatas are great anytime of day. Great for meal prep!

  • Author: Julie | The Simple Veganista
  • Prep Time: 10 min
  • Cook Time: 35 min
  • Total Time: 45 minutes
  • Yield: 12 1x
  • Category: Breakfast, Snack
  • Cuisine: Vegan

SCALE1x2x3x

ingredients

  • 1 3/4 cups chickpea flour (aka, garbanzo bean flour, gram flour)
  • 1/4 cup nutritional yeast, optional
  • 1 teaspoon baking powder
  • 1 teaspoon garlic powder
  • 1 teaspoon dried basil
  • 3/4 teaspoon mineral salt or black salt (see notes)
  • 2 cups water
  • 1 cup corn (frozen, fresh, or canned)
  • 1 large red bell pepper (1 cup), finely diced
  • jalapeno, finely diced
  • 1/4 red onion or medium shallot, finely diced
  • handful of baby kale or spinach, roughly chopped
  • chives, to garnish (optional)

instructions

Preheat oven to 375 degrees F. If not using a non-stick muffin tin, lightly grease with oil (see notes).

Mix: In a large mixing bowl, combine the chickpea flour, optional nutritional yeast, baking powder, salt, garlic powder and basil. Whisk in the water (batter will be runny, but that’s normal). Add the corn, bell pepper, jalapeno, onion and baby greens, mix to combine.

Scoop: Using a 1/4 measuring cup, scoop the batter into the muffin tin, filling all 12 holes. Top with a sprinkle of chives.

Bake: Place in the oven, on the center rack, and bake for 30 – 35 minutes. Do the toothpick test, by sticking it in the center of a muffin, if it comes clean, frittatas are ready.

Remove from oven, turn out frittatas and place on cooling rack to cool.

Leftovers can be stored, covered, in the refrigerator or on the counter. Reheat in a toaster oven or microwave.

Makes 12

notes

If using black salt, use about 1/2 teaspoon, and the other 1/2 teaspoon regular mineral salt. Too much black salt may be overpowering.

Feel free to change up the veggies, using at least 3 cups. Use an assortment of diced zucchini, mushrooms, peas, green bell peppers, finely chopped broccoli or carrots. Fresh herbs would be great too!

Muffin tin. If not using a non-stick muffin tin, lightly grease each muffin hole. If using non-stick, the frittatas will fall out when turned over. You may need to gently tap the tin, upside down, gently on a hard surface to release them.

What If my muffins don’t cook all the way through? There have been a few comments regarding the muffins being soggy in the center. If this is your experience, let them cool completely before eating. The center will thicken and your muffins will be perfect. I’ve personally never had an issue with a soggy center, but I know from experience from my other baked goods that letting it cool will do the trick

src: https://simple-veganista.com/mini-chickpea-flour-frittatas/

/*
Find duplicate charaters in a string with their counts
Example 1: JAVA, A = 2
*/
import java.util.*;
public class Solution
{
    public static void findDuplicates(String s) {
        Map<Character, Integer> charCountMap = new HashMap();
        
        for (Character c : s.toCharArray()) {
            if (charCountMap.containsKey(c)) {
                int count = charCountMap.get(c);
                count++;
                charCountMap.put(c, count);
            } else {
                charCountMap.put(c, 1);
            }
        } 
        Set<Character> keys = charCountMap.keySet();
        System.out.println("Duplicate Characters in "+s);
        for (Character key : keys) {
            if (charCountMap.get(key) > 1) {
                System.out.println("Character : "+key+" : "+charCountMap.get(key));
            }
        }
    }
    public static void main(String[] args) {

        findDuplicates("Java");
        findDuplicates("Mississipi");
        findDuplicates("Massachusets");
        
    }
}
/*
Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i].

Return the answer in an array.

Example 1:

Input: nums = [8,1,2,2,3]
Output: [4,0,1,1,3]
Explanation: 
For nums[0]=8 there exist four smaller numbers than it (1, 2, 2 and 3). 
For nums[1]=1 does not exist any smaller number than it.
For nums[2]=2 there exist one smaller number than it (1). 
For nums[3]=2 there exist one smaller number than it (1). 
For nums[4]=3 there exist three smaller numbers than it (1, 2 and 2).

*/
import java.util.Arrays;
public class Solution
{
    // public static vector<int> smallerNumbersThanCurrent(vector<int>& nums) {
        
    
    // }
    public static int[] smallerNumbersThanCurrent(int[] nums) {
            int[] counter = new int[101];
            // create a vector array with counts of numbers in the array
            // e.g for this num array -> counter Array : [0, 1, 2, 1, 0, 0, 0, 0, 1, 0]
            for (int num : nums) {
                counter[num]++;
            }   
            System.out.println ("counter Array : " + Arrays.toString(counter));
            
            int sum = 0;
            int[] preSum = new int[101];
            for (int i = 0; i < 101; i++) {
              preSum[i] = sum;
              sum += counter[i];
            }
            System.out.println ("preSum Array : " + Arrays.toString(preSum));
            System.out.println ("sum  : " + sum);
            int[] ans = new int[nums.length];
            for (int i = 0; i < nums.length; i++) {
              ans[i] = preSum[nums[i]];
            }
            System.out.println ("Ans Array : " + Arrays.toString(ans));
        return ans;
    }
    public static void main(String[] args) {
        int[] inputArray = {8,1,2,2,3};
    System.out.println ("Smaller Number Output Array : " + Arrays.toString(smallerNumbersThanCurrent(inputArray) ) );
    }
}
/*
Given an array nums of integers, return how many of them contain an even number of digits.
 

Example 1:

Input: nums = [12,345,2,6,7896]
Output: 2
Explanation: 
12 contains 2 digits (even number of digits). 
345 contains 3 digits (odd number of digits). 
2 contains 1 digit (odd number of digits). 
6 contains 1 digit (odd number of digits). 
7896 contains 4 digits (even number of digits). 
Therefore only 12 and 7896 contain an even number of digits.

*/
public class Solution
{
    public static int findNumbers(int[] nums) {
        int count = 0;
        for (int num : nums) {
            // convert numbers to String and check for their length (even would have n % 2 = 0)
            String s = Integer.toString(num);
            if(s.length() % 2 == 0) {
                count++;
            }
        }
        return count;
    }
    public static void main(String[] args) {
        int[] input = {12,345,2,6,7896};
        
        System.out.println ("The count of numbers which contain an even number of digits : " + findNumbers(input));
    }
}

Solution:
The problem can be solved by using a stack. 
We iterate over the characters of the string, 
and for every iteration:

* Declare a character stack S.
* Now traverse the expression string exp.
*** If the current character is a starting bracket 
(‘(‘ or ‘{‘ or ‘[‘) then push it to stack.
*** If the current character is a closing bracket 
(‘)’ or ‘}’ or ‘]’) then pop from stack and if the 
popped character is the matching starting bracket then 
fine else parenthesis are not balanced.
* After complete traversal, if there is some starting 
bracket left in stack then “not balanced”

Reference: 
https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/
https://www.callicoder.com/valid-parentheses/

/*
Valid Parentheses problem statement
Given a string containing just the characters (, ), {, }, [ and ], determine if the input string is valid.

An input string is valid if:

Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Note that an empty string is also considered valid.

Example 1:

Input: "()"
Output: true
Example 2:

Input: "()[]{}"
Output: true
Example 3:

Input: "(]"
Output: false
Example 4:

Input: "([)]"
Output: false
Example 5:

Input: "{[]}"
Output: true

*/

import java.util.Map;
import java.util.HashMap;
import java.util.Stack;

class ValidParentheses {
  public static boolean isValid(String str) {    
    Map<Character, Character> parenthesesMapping = new HashMap<>();
    parenthesesMapping.put('(', ')');
    parenthesesMapping.put('{', '}');
    parenthesesMapping.put('[', ']');

    Stack<Character> parentheses = new Stack<>();
    for(int i = 0; i < str.length(); i++) {
        char c = str.charAt(i);
        if(parenthesesMapping.containsKey(c)) {
            parentheses.push(c);    
        } else {
            if(parentheses.isEmpty()) {
                return false;
            }
            char target = parentheses.pop();
            if(!parenthesesMapping.containsKey(target) || parenthesesMapping.get(target) != c) {
                return false;
            }
        }
    }
    if(!parentheses.isEmpty()) {
        return false;
    }
    return true;
  }

  public static void main(String[] args) {
    System.out.println("([)]" + isValid("([)]"));
    System.out.println("([)]" + isValid("([)]"));
    System.out.println("([)]" + isValid("([)]"));
    System.out.println("([)]" + isValid("([)]"));
    System.out.println("([)]" + isValid("([)]"));
    
  }
}
/*
Given a valid (IPv4) IP address, return a defanged version of that IP address.
A defanged IP address replaces every period "." with "[.]".
*/

public class Solution
{
    public static String defangIPaddrUsingReplace(String address) {
        return address.replace(".","[.]");
    }
    public static String defangIPaddrWithoutReplace(String address) {
        return String.join("[.]", address.split("\\."));
    }
    public static String defangIPaddrNoLib(String address) {
        StringBuilder sb = new StringBuilder();
        for (char c : address.toCharArray()) {
            sb.append((c=='.')? "[.]":c);
        }
        return sb.toString();
    }
    public static void main(String[] args) {
        System.out.println ("Defanged IP address is : " + defangIPaddrUsingReplace("1.1.1.1"));
        System.out.println ("Defanged IP address is : " + defangIPaddrWithoutReplace("1.1.1.1"));
        System.out.println ("Defanged IP address is : " + defangIPaddrNoLib("1.1.1.1"));
    }
}

/*
Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.
*/
public class Solution
{
public static int numberOfSteps (int num) {
int stepCount = 0;
while (num > 0) {
if (num % 2 == 0) {
num = num / 2;
stepCount++;
} else {
num--;
stepCount++;
}
}
return stepCount;
}

public static void main(String[] args) {
System .out.println ("Number of steps: "+numberOfSteps(8));
}
}

/*
Given an array of integers, and a number ‘sum’, find the number of pairs of integers in the array whose sum is equal to ‘sum’.

Input  :  arr[] = {1, 5, 7, -1, 5}; 
          sum = 6
Output :  3
Pairs with sum 6 are (1, 5), (7, -1) &
                     (1, 5)  
Expected time complexity O(n)
HInt: Use Hashmaps and iterate over the array twice (O(n)+O(n) ) 

*/
import java.util.*;
import java.lang.Math;
public class Solution
{
    public static int numberOfPairs(int arr[], int sum) {
        HashMap<Integer,Integer> numMap = new HashMap<>();
        // first traversal
        for ( int i=0; i<arr.length; i++ ) {
            if ( numMap.containsKey(arr[i]) ) {
                numMap.put(arr[i], numMap.get(arr[i]) + 1);
            } else {
                numMap.put(arr[i], 1);
            }
        }
        int twice_count = 0;
        for ( int i=0; i<arr.length; i++ ) {
            // This will count the pair twice as we are traversing through the whole array (1,6) and (6,1)
            if (numMap.get(sum-arr[i]) !=  null) {
                twice_count+= numMap.get(sum-arr[i]) ;
                System.out.println ("Pair: arr[i] : and sum-arr[i] " + arr[i] +" "+ (sum-arr[i]) + " " + twice_count);
            }
            // to ensure the arr[i],arr[i] is not considered twice
            if (sum-arr[i] == arr[i]) {
                twice_count--; 
            }
        }
        // return the half of twice_count 
        return twice_count/2 ;
    }
    
    public static void main(String[] args) {
        
        int arr[] =  {1, 5, 7, -1, 5};
        int sum = 6;
        System.out.println ("Duplicates list : " + numberOfPairs(arr,sum));
    }
}
/*
Given an integer number n, return the difference between the product of its digits and the sum of its digit
Example 1:

Input: n = 234
Output: 15 
Explanation: 
Product of digits = 2 * 3 * 4 = 24 
Sum of digits = 2 + 3 + 4 = 9 
Result = 24 - 9 = 15

*/
public class Solution
{
    public static int subtractProductAndSum(int num) {
        int product = 1;
        int sum = 0;
        int digit;
        if (num <=0 ) return 0;
        while (num > 0) {
            digit = num % 10 ;
            product*= digit;
            sum+= digit;
            num = num / 10;
        }
        return (product - sum);    
    }
    public static void main(String[] args) {
        System.out.println ("Difference between product and difference : " + subtractProductAndSum(234));
    }
}

You’re given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character in S is a type of stone you have.  You want to know how many of the stones you have are also jewels.

The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from "A".

Example 1:

Input: J = "aA", S = "aAAbbbb"
Output: 3

Example 2:

Input: J = "z", S = "ZZ"
Output: 0

Note:

  • S and J will consist of letters and have length at most 50.
  • The characters in J are distinct.
public class Solution
{
    public static int numJewelsInStones(String J, String S) {
        int count = 0;
        for (char c : S.toCharArray()) {
            if (J.indexOf(c) != -1 ) {
                count++;
            }
        }
        return count;    
    }
    public static void main(String[] args) {
        String Jewels = "abC";
        String Stones = "aAbCAAbBBBB";
        System.out.println ("Number of Jewels : " + numJewelsInStones(Jewels,Stones));
    }
}