<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Scale to zero</title>
    <description>The latest articles on DEV Community by Scale to zero (@mindmath).</description>
    <link>https://dev.to/mindmath</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F276389%2Fd95d463f-b0d4-4629-8d02-dd4d89f3d620.jpeg</url>
      <title>DEV Community: Scale to zero</title>
      <link>https://dev.to/mindmath</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mindmath"/>
    <language>en</language>
    <item>
      <title>iOS System Design 25 days challenge</title>
      <dc:creator>Scale to zero</dc:creator>
      <pubDate>Mon, 06 Sep 2021 21:16:58 +0000</pubDate>
      <link>https://dev.to/mindmath/ios-system-design-3529</link>
      <guid>https://dev.to/mindmath/ios-system-design-3529</guid>
      <description>&lt;p&gt;Hey dev.to &lt;/p&gt;

&lt;p&gt;I am taking the oath to finish 25 days challenge to do one system design from iOS every single day&lt;/p&gt;

&lt;p&gt;If you have been looking out for help on iOS system designs and my post helps you please let me know I will harder and increase the number of questions i can cover everyday ! &lt;/p&gt;

&lt;p&gt;Day:1 &lt;br&gt;
Dt: 7/Sept:- Design a News Feed App&lt;br&gt;
Can you try to design a news feed app in iOS ? &lt;br&gt;
Answer :- I have designed a small system in which the app starts with AppDelegate / SceneDelegate &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On didfinishlaunch calls for the navigation manager:- 
This manager is a Singleton class and has its own viewmodel to handle the logic which screen to load on applaunch
It could be a login screen or List of feeds for an already logged in user. This depends on the view model logic &lt;/li&gt;
&lt;li&gt;Lets say viewmodel logic tells its time to show login screen when first time the app was launched. Then we show a login screen which is not part of our scope for now. But let say we stored a flag - logged_in inside userdefaults when log in was succesful&lt;/li&gt;
&lt;li&gt;After which we open the Feeds List screen directly and this feature has view, viewmodel and a presenter layer. 
The viewmodel is the one that calls for data to be shown on the list, it passes the data to the presenter which is then applied proper mascara before passing it to the view which then displays the feeds &lt;/li&gt;
&lt;li&gt;The viewmodel here connects with a layer called data fetcher which internally calls two parts one is networking layer and the other one was the database&lt;/li&gt;
&lt;li&gt;Database passes all the data that it has but then also calls the feeds api to get the latest data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I am done for today, I know my notes are not the best today, please keep patience with me, I will make it better everyday and oneday you will enjoy reading these articles.&lt;/p&gt;

</description>
      <category>ios</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Help! rectify Big O Notation, if wrong</title>
      <dc:creator>Scale to zero</dc:creator>
      <pubDate>Sun, 22 Dec 2019 13:23:34 +0000</pubDate>
      <link>https://dev.to/mindmath/help-rectify-big-o-notation-if-wrong-226e</link>
      <guid>https://dev.to/mindmath/help-rectify-big-o-notation-if-wrong-226e</guid>
      <description>&lt;p&gt;Please help me understand, what is the Order of Growth?&lt;br&gt;
What is the Big O notation for this program&lt;/p&gt;

&lt;p&gt;What i did so far?&lt;br&gt;
I wrote this problem.&lt;br&gt;
What is the Order of Growth according to me?&lt;br&gt;
There are two access to array&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;once during this check, c[jumpLevel2]==0  , Worst case, n time access&lt;/li&gt;
&lt;li&gt;Another during this, c[jumpLevel1]==0 , Worst case, n time access&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, 2N access&lt;br&gt;
Therefore O(n)&lt;/p&gt;

&lt;p&gt;Please correct me if I am wrong.&lt;/p&gt;

&lt;p&gt;import java.io.&lt;em&gt;;&lt;br&gt;
import java.math.&lt;/em&gt;;&lt;br&gt;
import java.security.&lt;em&gt;;&lt;br&gt;
import java.text.&lt;/em&gt;;&lt;br&gt;
import java.util.&lt;em&gt;;&lt;br&gt;
import java.util.concurrent.&lt;/em&gt;;&lt;br&gt;
import java.util.regex.*;&lt;/p&gt;

&lt;p&gt;public class Solution {&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Complete the jumpingOnClouds function below.
static int jumpingOnClouds(int[] c) {
    int i=0;
    int path = 0;
    int clouds = c.length;
    while (i&amp;lt;clouds){
        int jumpLevel2 = i+2;
        int jumpLevel1 = i+1;
        if ((jumpLevel2&amp;lt;clouds) &amp;amp;&amp;amp; c[jumpLevel2]==0){
            path+=1;
            i=jumpLevel2;
        } else if ((jumpLevel1&amp;lt;clouds) &amp;amp;&amp;amp; c[jumpLevel1]==0){
            path+=1;
            i=jumpLevel1;
        } else {
            return path;
        }
    }
    return path;
}

private static final Scanner scanner = new Scanner(System.in);

public static void main(String[] args) throws IOException {
    BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));

    int n = scanner.nextInt();
    scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

    int[] c = new int[n];

    String[] cItems = scanner.nextLine().split(" ");
    scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

    for (int i = 0; i &amp;lt; n; i++) {
        int cItem = Integer.parseInt(cItems[i]);
        c[i] = cItem;
    }

    int result = jumpingOnClouds(c);

    bufferedWriter.write(String.valueOf(result));
    bufferedWriter.newLine();

    bufferedWriter.close();

    scanner.close();
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Note: Code from Hackerrank, for my personal practise.&lt;br&gt;
I am using dev.to platform to help understand my understanding. haha &lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>Looking for learners to learn with me....</title>
      <dc:creator>Scale to zero</dc:creator>
      <pubDate>Mon, 09 Dec 2019 05:28:44 +0000</pubDate>
      <link>https://dev.to/mindmath/looking-for-learners-to-learn-with-me-3n5f</link>
      <guid>https://dev.to/mindmath/looking-for-learners-to-learn-with-me-3n5f</guid>
      <description>&lt;p&gt;I have started practicing on Hackerrank.&lt;br&gt;
Its been 4 days. &lt;br&gt;
I am doing really good with 30 days code challenge.&lt;br&gt;
But, after that when I choose random challenges, I find them too complicated. I face plethora of challenges but still somehow for last 3 days I kept trying and I couldnot solve any three. &lt;/p&gt;

&lt;p&gt;I want to learn &lt;br&gt;
I want to develop this skill of programming immensely.&lt;br&gt;
How do you overcome this situation ?&lt;br&gt;
Who are on the same path as me ?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>I [THING ABOUT YOU OR THING YOU ARE], Ask Me Anything!</title>
      <dc:creator>Scale to zero</dc:creator>
      <pubDate>Wed, 04 Dec 2019 13:35:16 +0000</pubDate>
      <link>https://dev.to/mindmath/i-thing-about-you-or-thing-you-are-ask-me-anything-2n83</link>
      <guid>https://dev.to/mindmath/i-thing-about-you-or-thing-you-are-ask-me-anything-2n83</guid>
      <description>&lt;p&gt;I have started to learn Algorithm through&lt;br&gt;
&lt;a href="https://www.coursera.org/learn/algorithms-part1/home/welcome"&gt;https://www.coursera.org/learn/algorithms-part1/home/welcome&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initial Week 1 and Week 2 contents, I am finding very tough to understand especially the Order of growth concept.&lt;/p&gt;

&lt;p&gt;But, I want to become pro at Algorithms and DataStructures&lt;/p&gt;

</description>
      <category>ama</category>
    </item>
  </channel>
</rss>
