Skip to main content

645. Set Mismatch - LeetCode Solution

Here is the video Solution

Comments

Popular posts from this blog

All About Flutter

F L U T T E R What is Flutter? Flutter is an open-source mobile SDK developer can use to build native-looking Android and iOS applications from the same code base. Flutter has been around since 2015 when Google introduced it and remained in the beta stage before its official launch in December 2018. Since then, the buzz around Flutter has been growing stronger. Widgets The central idea behind Flutter is the use of widgets. It’s by combining different widgets that developers can build the entire UI. Each of these widgets defines a structural element (like a button or menu), a stylistic element (a font or color scheme), a layout aspect (like padding), and many others. Flutter also provides developers with reactive-style views. To avoid performance issues deriving from using a compiled programming language to serve as the JavaScript bridge, Flutter uses Dart. It compiles Dart   ahead of time (AOT)   into the native code for multiple platforms. Flutter also provides developers wit...

Are you smart?

S ocrates once said " I know one thing, that I know nothing " Hello humans, Put on a helmet, because after reading this your mind may explode 😨 (just kidding). I will be sharing with you some famous paradoxes that will hit your brain hard. Let's begin  1. Do you have a brother?   Consider a family, where there is a mother, father, and two children. One of the children is a boy, then what are the chances of the second one being a girl. Is it 1/2, because the other children can be either a boy or a girl. But, wait a minute...   There are four possible combinations of two children ( Boy, Boy), (Boy, Girl),(Girl, Boy) and (Girl, Girl). Since one of the children is a boy, so the combination can not be (Girl, Girl), this means we are left with 3 possible combinations. This gives us the chances of the other children being a boy as 1/3. Uhhh... this is confusing is it 1/2 or 1/3. You tell me🤪 2. Crocodility Once upon a time, a mother and a son visited a zoo. Accidentally, the ...

699. Falling Squares - LeetCode Solution

699 .   Falling Squares On an infinite number line (x-axis), we drop given squares in the order they are given. The   i -th square dropped ( positions[i] = (left, side_length) ) is a square with the left-most point being   positions[i][0]   and sidelength   positions[i][1] . The square is dropped with the bottom edge parallel to the number line, and from a higher height than all currently landed squares. We wait for each square to stick before dropping the next. The squares are infinitely sticky on their bottom edge, and will remain fixed to any positive length surface they touch (either the number line or another square). Squares dropped adjacent to each other will not stick together prematurely.   Return a list   ans   of heights. Each height   ans[i]   represents the current highest height of any square we have dropped, after dropping squares represented by   positions[0], positions[1], ..., positions[i] . Example 1: Input: [[1,...