Mobile Tech
1.15K subscribers
92 photos
8 videos
6 files
138 links
Michael Lazebny's blog about @dart and @flutter
lazebny.io
Download Telegram
Today I learned an interesting algorithm for finding the majority element.

The Boyer-Moore majority algorithm is a popular algorithm for finding the majority element in a list of integers. The majority element in an array (or list) is an element that appears more than n/2 times where n is the size of the array.

Here's a simple way to describe the Boyer-Moore Voting Algorithm:

1. Start with an initial candidate and a counter set to 0.
2. Iterate over the list of numbers.
3. For the current number: If the counter is zero, set the current number as the candidate.
4. If the current number is the candidate, increment the counter. Otherwise, decrement the counter.
5. The candidate will be the majority number.

#dart #leetcode #tipoftheday #algorithm
πŸ‘8πŸ€“2
Media is too big
VIEW IN TELEGRAM
Implemented both theme scope and locale scope for Sizzle Starter
πŸ”₯6πŸ‘5
Mobile Tech
Choose themes you are interested in (Top 3 wins) [Advanced Questions]
The results are:

1. Streams
2. Navigator
3. State restoration
πŸ”₯6
πŸ‘3πŸ‘1
The next article will be about streams: how do they work under the hood, comprehensive analysis. Transformers, generators, subscriptions, listeners. Stream controllers and rxdart.
❀10
Many people follow the official Flutter channel, and there is a well-known rubric called Observable Flutter, which invites the most renowned contributors and open-source activists.

Recently, Dane Mackier, the author of Stacked, presented the library and I aim to provide an overview of his brainchild. My objective is to inform and increase awareness of the architecture and principles presented, rather than critique.

Read about it in my article. This should be interesting for folks who don't use stacked as well.
πŸ”₯4πŸ‘3
Decided to create a site that will serve as a documentation for sizzle starter
πŸ”₯11
As human beings, we can only control a small part of things, and it is natural that there are some things beyond our control. Do your best if you can influence the outcome. Otherwise, don't worry about it.
πŸ‘5
How to work with Clipboard in flutter?

There is a class Clipboard for these purposes in flutter:services.

It has two simple methods: setData and getData.

#tip #flutter #clipboard
πŸ‘9