text stringlengths 2 132k | source dict |
|---|---|
it’s delicious but I was just wondering about your view on the nuts and seeds going rancid by being baked? I have read that heating nut and seed oils makes them unstable and therefore toxic for the body. Some light on this subject would be great! Thanks again for the gorgeous and inspiring recipes x Reply JEN February ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
working out 5 days a week and not getting enough protein. Thank you! Ellen Regan Reply KRISTEN February 17, 2013 at 10:34 pm After a semester abroad in Copenhagen in the fall, I’ve been missing Danish bread! I just made this last night for dinner with some dear friends who have been traveling. We all made some of our f... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
JOCELYN February 17, 2013 at 4:52 am I made the bread and it broke coming out of the metal pan. Next time I will line the pan with parchment paper. I also gave the sunflower and flax seed a light roast in a frying pan before adding to the mix. I suggest putting the oil and maple syrup in with the water just to make sur... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
February 16, 2013 at 8:41 pm Thank you for this recipe! I’m gluten free and I do make my own gluten free bread but I don’t make it often because of all the starches and gums that you need to make it. This loaf was so easy and looked exactly like your picture which is gorgeous! I will be making this often. Reply ANNE-SO... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
the taste of quinoa Reply SAMANTHA February 16, 2013 at 12:18 pm I live in australia and most/if not all oats here aren’t gluten free, and most oat packs here are filled with nuts and other additives.. I’m not too keen on the taste and not knowing completely how much water I should add to the quinoa.. Is there remotely... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
and taste your creations! Again, thanks for your blog, and even though I don’t normally comment, I really appreciate your recipes and your very informative explanations on everything. It has definitely helped me eat healthier (and yummier) on a regular basis. Reply KRISTIN February 16, 2013 at 7:24 am You had me at “he... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
right now……oh my so good – thank you so much for sharing this! I have Candida and wasn’t sure of my organic oatmeal so I used quinoa flakes & stevia, I used a glass pan lined with parchment paper & let it sit over night. This morning I tested it by lifting up the sides of the paper and pulling it out – it was perfectly... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
I became almost giddy when I tried it. It’s so simple, so good, and has none of the downsides of flour-based bread. It’s definitely going to become a regular part of my kitchen repertoire! I found all the ingredients at Trader Joes and it was inexpensive. Try it with homemade jam and chai! Yum! Thank you Sarah! Reply K... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
in the food processor? Someone please reply – desperate to try this! Reply SARAH BRITTON February 15, 2013 at 1:15 pm Hi Emma, Try whizzing them up in a coffee grinder – it should work fine. To Loretta, If you roast the nuts yourself at home that is okay. I would discourage you from purchasing nuts and seeds that have ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
15, 2013 at 2:13 am I made this bread yesterday – it is fantastic! It holds up well and, indeed, toasts fantastically. Next time I make it, I will reduce the sunflower seeds. This is purely a personal preference, as I don’t love sunflower seeds. I would love to try adding some chopped dates, raisins, or dried cranberri... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
popular class to teach, though it does require planning ahead with long resting time. Your life-changing loaf sounds like an easy, healthy and gluten-free bread to bake! I bet you used this loaf for your Beet Tartine with Marinated Caper Berries, right? Thank you much Sarah for continuing to inspire us. You are the bes... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
before that should help getting it out much easier. For my part: I just scratched the remainings and build something that will surely turn out to be a great bread crust! Thanks for all this inspiration and this great black bread recipe for lazy people! Reply OLA February 14, 2013 at 12:08 pm Hey I can’t seem to find an... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
“HUSK”. You can sometimes find it at Netto but always a health food store 🙂 xo, Sarah B Reply AGNÈS February 14, 2013 at 10:45 am this looks amazing ! all those nuts in such a beautiful loaf, must be a keeper 😉 Reply FUSSY February 14, 2013 at 9:17 am I’m a little wary about the flax seed. Although I see it included ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Love, from Canada:) Reply NIKOLE February 14, 2013 at 5:51 am As someine who has gluten intolerence, lactose intolerence, and an issue with yeasts, I have to say thank you for this. I am making it right now. And I just cannot wait, cannot wait I tell you, to try this. I have missed toast, so very much, and I have been ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
baking… Reply FRANCESCA HUGHES February 14, 2013 at 1:06 am Just found this recipe on Pinterest and it looks amazing! I can’t wait to try it, thank you :). I’m going to spend the rest of the evening reading the rest of your blog! xxx Reply ANGELA February 14, 2013 at 12:12 am Thanks for the wonderful recipe Sarah. I ma... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
for sharing. BTW…I make so many of your recipes. I adore the RAW tacos! 🙂 Reply KATIEOUTDOORS February 13, 2013 at 11:53 pm Amazing!!! I’ve just tried the bread and its lovely, I was surprised to have all the ingredients in the cupboard so just had to make it and definately not disappointed this is my new bread so eas... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
avocado for breakfast, my son enjoyed it with honey. An absolute winner and I will make again. All of the ingredients easy to track down here in Australia. Thank you! xo Reply JANE LININGER February 13, 2013 at 9:56 pm Lovely Blog! I am going to try this bread soon! Reply ALEXANDRA @ DELICIOUS KNOWLEDGE February 13, 20... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
is really excellent. I will use less salt next time though and am thinking of adding coriander seeds. Chopped up dried apricots would go very well with the hazelnuts. It’s great that the ingredients can be modified so easily. Thanks for sharing your wonderful recipes with us, Sarah, and congratulations on your newly de... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
you give me advice on this? Thanks a lot again! Reply AMANDA @POPPIESANDICECREAM February 13, 2013 at 2:43 pm Dear Sarah, you got me wondering, why should commercial yeast be avoided? Reply ANNA February 13, 2013 at 2:41 pm This is serendipitous in so many ways! I’ve been making a similar bread – without the oats, as I... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
you also do it in the dry-oven and dry it? Reply MARISSA @ THE BOOT February 13, 2013 at 9:34 am i’m ready for my life to change! this is incredible! will i be able to find psyllium here in italy? i hope so! Reply SEBASTIAN February 13, 2013 at 9:22 am Thanks for your fantastic recipe, I’m crazy about baking breads. I ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
wonder if you could toast thin pieces, toast in oven and make crackers too! Either way I’m so making this, thanks! Reply ANGIE February 13, 2013 at 7:19 am In the oven as i type, yum yum Reply ANNALIESE February 13, 2013 at 5:40 am I read this post & made a list for the grocery store. The dough is sitting in the pan ov... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
TASTE SPACE February 13, 2013 at 3:48 am Looks utterly scrumptious, Sarah. I discovered the wonderful nature of psyllium earlier this year, as well. I make single-serving chocolate cakes with psyllium, hemp protein powder, carob/cocoa powder. mesquite and a dash of mint! Reply KAREN M. February 13, 2013 at 3:42 am Sou... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
keep up the awesome work!!! we even put one of your recipes on our school blog! un gros merci! Reply OLIVIA February 13, 2013 at 1:07 am TOTAL. FOOD. PORN. Reply SISI February 13, 2013 at 12:49 am Could you make muffin out of it instead of a loaf of bread? Thanks! Reply SARAH February 13, 2013 at 12:39 am By “flexible... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
11:57 pm Yum! I have all of these ingredients at home besides the psyllium. This will be so easy and fun to make. I love a good gluten-free bread with no flour. Reply MARIE February 12, 2013 at 11:51 pm Wow! Just saw your post and immediately went on Amazon to order the psyllium husks! Will arrive on Valentine’s day, h... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
time to try this today as I have 90% of the ingredients on hand. I don’t know about other countries (I am in Australia) but psyllium husk is super easy to find here they even sell it in the local supermarkets in the healthy section. Reply ABBIE February 12, 2013 at 10:07 pm I can’t wait to make this bread. I had a ques... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
All! Wow – amazing response this bread is getting! Thanks for your enthusiasm! Okay, to answer questions: 1. There is no substitute for the psyllium husks. Whenever I write an entire article about a specific ingredient, it is because THAT is the point of the recipe, as it highlights one way you can use it. For those of... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
maybe this bread is just not for me. Thoughts? Suggestions? Thanks! MACKENZIE @ WHATEVER, GATSBY February 12, 2013 at 9:24 pm oh mylanta, that bread is a work of art in itself. i’d move to denmark just for that, for sure. Reply Pingback: Mjölfritt bröd! | fooooooood! VALERIE February 12, 2013 at 9:12 pm Bread looks ama... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
carbs in other flours. Reply JUDE January 17, 2014 at 4:04 pm any suggestions for alternative to Psyllium due to allergy Reply PAMELA February 13, 2014 at 3:04 pm I made this bread without the psyllium and just exchanged it by adding the difference with extra ground flax seed and chia seeds. ( 2 TBSPS of each… You coul... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Will definitely try this soon! Reply LIL February 12, 2013 at 8:26 pm Oats are GF (though it’s a good idea to buy ones labeled as gluten free, since they’re often processed too close to gluten products to be safe), however many folks who have just gone GF find that they have a sensitivity to oats. Over time that sensit... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
be able to find psyllium. I’m going to try. I want a life-changing bread. Reply CAITLIN February 12, 2013 at 8:14 pm i want this bread to change my life. it looks perfect in every way! Reply KELLY February 12, 2013 at 8:08 pm hi Sarah, could I use flax meal instead of seeds? If so, what should the proportions be? Thank... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
make bread id just have to add the wet and let it sit. The mason jar versions would also make wonderful gifts. 🙂 thanks again! I do beleieve that this bread will change my life – good call on the title. Reply JENNA January 18, 2020 at 8:48 am Great idea with mason jars! I will absolutely be giving life-changing jars a... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
you buy in the stores are not gluten free because the farmers usually – not always but usually plant wheat and oats during the same season and use the same threshers. In that way there *may* be particles of gluten from the wheat that gets processed along with the oats. If they are certified Gluten Free that means that ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
a licensed naturopathic doctor who specializes in food sensitivities and just want to take a moment to shed some light on the oats/gluten issues. Oats contain a protein within them that structurally looks very similar to gluten so the body may (or may not) cross react to this if a person is gluten sensitive. I hope tha... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
all kinds od cereals and although you feel yourself losing weight, to me is impossible to folllow because I have a spleen deficiency and need cereals on a daily basis. But you, as an expert on food an ealth, what do you think about it? Kiss and thanks Reply KASSIEP January 20, 2014 at 5:57 pm These are not white, proce... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
sweetener. A couple of drops of liquid stevia extract usually works for me, but it depends on your preferred level of sweet. Xylitol is another sugar free (non-artificial) sweetener that you can use just like sugary things. Perhaps some lemon juice if you’re just looking for flave? Perhaps sub some poppy seeds for a nu... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
BREAD THE BEST LENTIL SALAD EVER MARRY ME BUTTER BEANS STRAWBERRY RHUBARB ROSE CRUMBLE BARS THE LIFE-CHANGING CRACKERS NORTH INDIAN-INSPIRED BUTTER CHICKPEAS FIND SOMETHING DELICIOUS Search Search Join the My New Roots newsletter! It's free and filled with delicious inspiration! SUBSCRIBE WATCH MY ONLINE COOKING CLASSE... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Title: GitHub - ruppysuppy/Daily-Coding-Problem-Solutions: 🎓🖥️ Solutions for 350+ Interview Questions asked at FANG and other top tech companies URL Source: Markdown Content: Daily Coding Problem Solutions ------------------------------ []( This repository contains the **Daily Coding Problem, which serializes the tr... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well. For example, the input [3, 4, -1, 1] should give 2. The input [1, 2, 0] should give 3. You can modify the input ar... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
allowed. Solution is a tree where all nodes under it have the same value. Given the root to a binary tree, count the number of unival subtrees. For example, the following tree has 5 unival subtrees: ``` 0 / \ 1 0 / \ 1 0 / \ 1 1 ``` [Solution]( * * * ### Problem 9 []( This problem was asked by Airbnb. Given a list of i... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
by Google. The area of a circle is defined as r^2. Estimate \pi to 3 decimal places using a Monte Carlo method. Hint: The basic equation of a circle is x^2 + y^2 = r^2. Solution: adds the order_id to the log get_last(i): gets the ith last element from the log. i is guaranteed to be smaller than or equal to N. You shoul... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
the length of the longest absolute path to a file in the abstracted file system. If there is no file in the system, return 0. Solution 7 = max(5, 2, 7) 8 = max(2, 7, 8) 8 = max(7, 8, 7) ``` Do this in O(n) time and O(k) space. You can modify the input array in-place and you do not need to store the results. You can sim... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
exact same node objects. Do this in O(M + N) time (where M and N are the lengths of the lists) and constant space. Solution for classroom lectures (possibly overlapping), find the minimum number of rooms required. For example, given [(30, 75), (0, 50), (60, 150)], you should return 2. Solution, return the original sent... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
start = (3, 0) (bottom left) and end = (0, 0) (top left), the minimum number of steps required to reach the end is 7, since we would need to go through (1, 2) because there is a wall everywhere else on the second row. Solution, where h is the height of the tree. Solution which matches any single character * * (asterisk... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
regular expression `".*at"` and the string "chat", your function should return true. The same regular expression on the string "chats" should return false. Solution. For example, given the string "([])[]( you should return true. Given the string "([)]" or "((()", you should return false. [Solution]( * * * ### Problem 2... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
on the left "fox jumps over", # 2 extra spaces distributed evenly "the lazy dog"] # 4 extra spaces distributed evenly Solution time and O(1) space. For example, given the input [2, 1, 2], we can hold 1 unit of water in the middle. Given the input [3, 0, 1, 3, 0, 5], we can hold 3 units in the first index, 2 in the seco... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
currency, so that you can end up with some amount greater than A of that currency. There are no transaction costs and you can trade fractional quantities. Solution. For example, given the string "race", you should return "ecarace", since we can add three letters to it (which is the smallest amount to make a palindrome)... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
'R', 'B', 'R', 'G'], it should become ['R', 'R', 'R', 'G', 'G', 'B', 'B']. [Solution]( * * * ### Problem 36 []( This problem was asked by Dropbox. Given the root to a binary search tree, find the second largest node in the tree. [Solution]( * * * ### Problem 37 []( This problem was asked by Google. The power set of a s... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
of steps it should run for. Once initialized, it should print out the board state at each step. Since it's an infinite board, print out only the relevant coordinates, i.e. from the top-leftmost live cell to bottom-rightmost live cell. You can represent a live cell with an asterisk `*` and a dead cell with a dot `.`. So... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
target number k, write a function that returns a subset of S that adds up to k. If such a subset cannot be made, then return null. Integers can appear more than once in the list. You may assume all numbers in the list are positive. For example, given `S = [12, 1, 61, 5, 9, 2]` and `k = 24`, return [12, 9, 2, 1] since i... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
numbers representing the stock prices of a company in chronological order, write a function that calculates the maximum profit you could have made from buying and selling that stock once. You must buy before you can sell it. For example, given [9, 11, 8, 5, 7, 10], you should return 5, since you could buy the stock at ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
array using only swaps. It should run in O(N) time. Hint: Make sure each one of the 52! permutations of the deck is equally likely. Solution cache. It should be able to be initialized with a cache size n, and contain the following methods: set(key, value): sets key to value. If there are already n items in the cache an... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
problem was asked by Google. Given an undirected graph represented as an adjacency matrix and an integer k, write a function to determine whether each vertex in the graph can be colored such that no two adjacent vertices share the same color using at most k colors. Solution function, where x and y are integers and retu... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
and M, write a function to count the number of ways of starting at the top-left corner and getting to the bottom-right corner. You can only move right or down. For example, given a 2 by 2 matrix, you should return 2, since there are two ways to get to the bottom-right: * Right, then down * Down, then right Given a 5 by... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
toss. Solution cache. It should be able to be initialized with a cache size n, and contain the following methods: * `set(key, value)`: sets key to value. If there are already n items in the cache and we are adding a new item, then it should also remove the least frequently used item. If there is a tie, then the least r... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
multiplying any three integers. For example, if the list is [-10, -10, 5, 2], we should return 500, since that's -10 _ -10 _ 5. You can assume the list has at least three integers. Solution that returns an integer from 1 to 7 (inclusive) with uniform probability, implement a function rand5() that returns an integer fro... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
of vertices `[0, 2, 3, 4], (A, A, C, A)`. The following input graph: ``` A [(0, 0)] ``` Should return null, since we have an infinite loop. Solution _ (j + 1) (if 0-indexed) or i _ j (if 1-indexed). Given integers N and X, write a function that returns the number of times X appears as a value in an N by N multiplicatio... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
contiguous. For example, given the array `[0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]`, the longest increasing subsequence has length 6: it is `0, 2, 6, 9, 11, 15`. Solution. As another example, given the following table: ``` zyx wvu tsr ``` Your function should return 3, since we would need to remove all th... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
linked lists, write a function to merge all the lists into one sorted singly linked list. Solution, and a digit string, return all possible letters the number could represent. You can assume each valid number in the mapping is a single digit. For example if `{'2': ['a', 'b', 'c'], '3': ['d', 'e', 'f'], }` then `"23"` s... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
d e f ``` should become: ``` a / \ c b \ / \ f e d ``` Solution. For example, given the string "()())()", you should return 1. Given the string ")(", you should return 2, since we must remove all of them. [Solution]( * * * ### Problem 87 []( This problem was asked by Uber. A rule looks like this: `A NE B` This means th... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
was asked by LinkedIn. Determine whether a tree is a valid binary search tree. A binary search tree is a tree with two children, left and right, and satisfies the constraint that the key in the left child must be less than or equal to the root and the key in the right child must be greater than or equal to the root. So... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
one node, and does not need to go through the root. Solution? Solution: # sets key to value for t = time. get(key, time): # gets the key at t = time. ``` The map should work like this. If we set a key at a particular time, it will maintain that value forever or until it gets set at a later time. In other words, when we... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
1 at time 3 should be 2 d.set(1, 1, 5) # set key 1 to value 1 at time 5 d.get(1, 0) # get key 1 at time 0 should be null d.get(1, 10) # get key 1 at time 10 should be 1 d.set(1, 1, 0) # set key 1 to value 1 at time 0 d.set(1, 2, 0) # set key 1 to value 2 at time 0 d.get(1, 0) # get key 1 at time 0 should be 2 ``` Solut... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
number of steps in which you can achieve it. You start from the first point. Example: Input: `[(0, 0), (1, 1), (1, 2)]` Output: 2 It takes 1 step to move from (0, 0) to (1, 1). It takes one more step to move from (1, 1) to (1, 2). Solution, return two prime numbers whose sum will be equal to the given number. A solutio... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
`1 -> 4 -> 3 -> 4 -> 1` returns true while `1 -> 4` returns false. [Solution]( * * * ### Problem 105 []( This problem was asked by Facebook. Given a function f, and N return a debounced f of N milliseconds. That is, as long as the debounced f continues to be invoked, f itself will not be called for N milliseconds. [Sol... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
a binary tree, return all paths from the root to leaves. For example, given the tree ``` 1 / \ 2 3 / \ 4 5 ``` it should return `[[1, 2], [1, 3, 4], [1, 3, 5]]`. Solution of two given nodes in the tree. Assume that each node in the tree also has a pointer to its parent. According to the definition of LCA on Wikipedia: ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself. Solution`. That is, `generate()` should return a tree whose size is unbounded but f... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
most k, return whether you can make a palindrome. For example, given 'waterrfetawx' and a k of 2, you could delete f and x to get 'waterretaw'. [Solution]( * * * ### Problem 122 []( This question was asked by Zillow. You are given a 2-d matrix where each cell represents number of coins in that cell. Assuming we start a... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
return two nodes in the tree whose sum equals K. For example, given the following tree and K of 20 ``` 10 / \ 5 15 / \ 11 15 ``` Return the nodes 5 and 15. Solution` as: `4 -> 2 -> 1` [Solution]( * * * ### Problem 128 []( The Tower of Hanoi is a puzzle game with three rods and n disks, each a different size. All the di... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
it on top of another stack. * You cannot place a larger disk on top of a smaller disk. Write a function that prints out all the steps necessary to complete the Tower of Hanoi. You should assume that the rods are numbered, with the first rod being 1, the second (auxiliary) rod being 2, and the last (goal) rod being 3. F... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
records a hit that happened at timestamp * `total()`: returns the total number of hits recorded * `range(lower, upper)`: returns the number of hits that occurred between timestamps lower and upper (inclusive) Follow-up: What if our system has limited memory? Solution`: initialize with the original large array and size.... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
1¢, 5¢, 10¢, and 25¢. For example, given n = 16, return 3 since we can make it with a 10¢, a 5¢, and a 1¢. Solution and hasNext(), create a wrapper iterator, PeekableInterface, which also implements peek(). peek shows the next element that would be returned on next(). Here is the interface: ``` class PeekableInterface(... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
index of the nearest larger number of the number at index `i`, where distance is measured in array indices. For example, given `[4, 1, 3, 5, 6]` and index `0`, you should return `3`. If two distances to larger numbers are equal, then return any one of them. If the array at `i` doesn't have a nearest larger integer, the... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
generate a possible gray code for it. For example, for `n = 2`, one gray code would be `[00, 01, 11, 10]`. Solution` which returns the sum from the sublist `L[i:j]` (including i, excluding j). For example, given `L = [1, 2, 3, 4, 5]`, `sum(1, 3)` should return `sum([2, 3])`, which is `5`. You can assume that you can do... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
0.2, 0.2]`, your function should return `1``10%` of the time, `2``50%` of the time, and `3` and `4``20%` of the time. You can generate random numbers between 0 and 1 uniformly. Solution between any two given words in a string. For example, given words "hello", and "world" and a text content of "dog cat hello cat dog do... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
down. `0` represents an empty space while `1` represents a wall you cannot walk through. For example, given the following matrix: ``` [[0, 0, 1], [0, 0, 1], [1, 0, 0]] ``` Return `2`, as there are only two ways to get to the bottom right: * `Right, down, down, right` * `Down, right, down, right` The top left corner and... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
list: * dog * cat * apple * apricot * fish Return the list: * d * c * app * apr * f Solution)) * 3) - (2 + (1 + 1)) = 5`. You can assume the given expression is always valid. [Solution]( * * * ### Problem 164 []( This problem was asked by Google. You are given an array of length n + 1 whose elements belong to the set `... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
### Problem 166 []( This problem was asked by Uber. Implement a 2D iterator class. It will be initialized with an array of arrays, and should implement the following methods: * `next()`: returns the next element in the array of arrays. If there are no more elements, raise an exception. * `has_next()`: returns whether o... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
from start to end such that only one letter is changed at each step of the sequence, and each transformed word exists in the dictionary. If there is no possible transformation, return null. Each word in the dictionary have the same length as start and end and is lowercase. For example, given `start = "dog"`, `end = "ca... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
occur. Solution, ('a', 'b', 0.075), ('a', 'c', 0.025), ('b', 'a', 0.15), ('b', 'b', 0.8), ('b', 'c', 0.05), ('c', 'a', 0.25), ('c', 'b', 0.25), ('c', 'c', 0.5) ] ``` One instance of running this Markov chain might produce `{'a': 3012, 'b': 1656, 'c': 332 }`. [Solution]( * * * ### Problem 176 []( This problem was asked ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
and `k = 3`, it should become `3 -> 4 -> 5 -> 1 -> 2`. [Solution]( * * * ### Problem 178 []( This problem was asked by Two Sigma. Alice wants to join her school's Probability Student Club. Membership dues are computed via one of two simple probabilistic games. The first game: roll a die repeatedly. Stop rolling once yo... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Google. Given a string, split it into as few strings as possible such that each string is a palindrome. For example, given the input string `"racecarannakayak"`, return `["racecar", "anna", "kayak"]`. Given the input string `"abc"`, return `["a", "b", "c"]`. Solution, "dimensions": (3, 3) # width, height } ``` and ``` ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Problem 187 []( This problem was asked by Google. You are given given a list of rectangles represented by min and max x- and y-coordinates. Compute whether or not a pair of rectangles overlap each other. If one rectangle completely covers another, it is considered overlapping. For example, given the following rectangle... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
of intervals you need to remove to make the rest of the intervals non-overlapping. Intervals can "touch", such as `[0, 1]` and `[1, 2]`, but they won't be considered overlapping. For example, given the intervals `(7, 9), (2, 4), (5, 8)`, return `1` as the last interval can be removed and the first two won't overlap. Th... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
is a `$4` fee, so we have `7 + 6 = 13` profit minus `$4` of fees. Solution` satisfies either `i % j = 0` or `j % i | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
= 0`. For example, given the set `[3, 5, 10, 20, 21]`, you should return `[5, 10, 20]`. Given `[1, 3, 6, 24]`, return `[1, 3, 6, 24]`. Solution"`, you could return `"(())"`. Given `"))()("`, you could return `"()()()()"`. Solution, (4, 5), (7, 9), (9, 12)]`, you should return `[4, 9]`. [Solution]( * * * ### Problem 201... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
an integer is a palindrome. For example, `121` is a palindrome, as well as `888`. `678` is not a palindrome. Do not convert the integer into a string. Solution` time. You may assume the array does not contain duplicates. For example, given `[5, 7, 10, 3, 4]`, return `3`. [Solution]( * * * ### Problem 204 []( **THE PROB... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
pivot `k`, partition the linked list so that all nodes less than `k` come before nodes greater than or equal to `k`. For example, given the linked list `5 -> 1 -> 8 -> 0 -> 3` and `k = 3`, the solution could be `1 -> 0 -> 5 -> 8 -> 3`. [Solution]( * * * ### Problem 209 []( This problem was asked by YouTube. Write a pro... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Snapchat. Given a string of digits, generate all possible valid IP address combinations. IP addresses must follow the format `A.B.C.D`, where `A`, `B`, `C`, and `D` are numbers between `0` and `255`. Zero-prefixed numbers, such as `01` and `065`, are not allowed, except for `0` itself. For example, given "2542540123", ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
1000, 'D': 500, 'C': 100, 'L': 50, 'X': 10, 'V': 5, 'I': 1 } ``` In addition, note that the Roman numeral system uses subtractive notation for numbers such as `IV` and `XL`. For the input `XIV`, for instance, you should return `14`. Solution is sparse, but `22` (`10110`) is not. For a given input `N`, find the smallest... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
amount of money you can win with certainty, if you move first, assuming your opponent plays optimally. Solution` space complexity, where `h` is the height of the tree. Write a program to compute the in-order traversal of a binary tree using `O(1)` space. Solution` solution if `k = 2`. [Solution]( * * * ### Problem 226 | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
[]( This problem was asked by Airbnb. You come across a dictionary of sorted words in a language you've never seen before. Write a program that returns the correct order of letters in this language. For example, given `['xww', 'wxyz', 'wxyw', 'ywx', 'ywz']`, you should return `['x', 'z', 'w', 'y']`. [Solution]( * * * #... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
4: 14, 9: 31, 21: 42, 28: 84, 36: 44, 51: 67, 71: 91, 80: 100} ``` Solution`: Set a given key's value in the map. If the key already exists, overwrite the value. `sum(prefix: str)`: Return the sum of all values of keys that begin with a given prefix. For example, you should be able to run the following code: ``` mapsum... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Problem 233 []( This problem was asked by Apple. Implement the function `fib(n)`, which returns the nth number in the Fibonacci sequence, using only `O(1)` space. Solution` comparisons. Solution, (x2, y2), ..., (xN, yN)` representing a polygon. You can assume these points are given in order; that is, you can construct ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
total is 16 or lower, otherwise pass. * Finally, the two compare totals, and the one with the greatest sum not exceeding 21 is the winner. For this problem, cards values are counted as follows: each card between 2 and 10 counts as their face value, face cards count as 10, and aces count as 1. Given perfect knowledge of... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
there are multiple `h` satisfying this formula, the maximum is chosen. For example, suppose `N = 5`, and the respective citations of each paper are `[4, 3, 0, 1, 5]`. Then the h-index would be `3`, since the researcher has `3` papers with at least `3` citations. Given a list of paper citations of a researcher, calculat... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
6, 8, ...]` (multiples of two), then `[6, 9, 12, ...]` (multiples of three), and so on. Once we have done this for all primes less than `N`, the unmarked numbers that remain will be prime. Implement this algorithm. Bonus: Create a generator that produces primes indefinitely (that is, without taking `N` as an input). [S... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
by Nvidia. Find the maximum of two numbers without using any if-else statements, branching, or direct comparisons. Solution))`. Create an algorithm to turn an ordinary fraction `a / b`, where `a < b`, into an Egyptian fraction. [Solution]( * * * ### Problem 253 []( This problem was asked by PayPal. Given a string and a... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
i z s g ``` [Solution]( * * * ### Problem 254 []( This problem was asked by Yahoo. Recall that a full binary tree is one in which each node is either a leaf node, or has two children. Given a binary tree, convert it to a full one by removing nodes with only one child. For example, given the following tree: ``` a / \ b ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
window that must be sorted in order for the entire array to be sorted. For example, given `[3, 7, 5, 6, 9]`, you should return `(1, 3)`. [Solution]( * * * ### Problem 258 []( This problem was asked by Morgan Stanley. In Ancient Greece, it was common to write text with the first line going left to right, the second line... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
you could return `[1, 2, 3, 0, 4]`. Solution graph is an edge that, if removed, causes the graph to become disconnected. Find all the bridges in a graph. Solution` or terminal marks `(.,?,!,‽)`. * There must be a single space between each word. * The sentence must end with a terminal mark immediately following a word. ... | {
"page_id": null,
"source": 7370,
"title": "from dpo"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.