[{"data":1,"prerenderedAt":242},["ShallowReactive",2],{"tag-labels":3,"site-header":4,"article-pentingnya-memahami-algoritma-dan-struktur-data-en":72},{},{"featuredPost":5,"navigations":29},{"id":6,"title":7,"title_id":8,"slug":9,"excerpt":10,"excerpt_id":11,"has_translation":12,"published_at":13,"reading_time":14,"hidden_from_listing":15,"tags":16,"thumbnail_image":21,"og_image":22,"series":23,"authors":28},110,"When You Pick a Framework Just to Look Different","Ketika Pilih Framework Cuma Biar Kelihatan Beda","ketika-pilih-framework-cuma-biar-kelihatan-beda","The last time you chose a new framework or library, was it because your problem needed that tool, or because it sounded cool and few people around you were using it? That question is uncomfortable. Technology decisions are often made for reasons that never appear in any technical document.","Terakhir kali kamu milih framework atau library baru, itu karena masalahmu butuh alat itu, atau karena alatnya kedengaran keren dan belum banyak yang pakai? Pertanyaan ini nggak enak dijawab. Soalnya keputusan teknologi sering diambil dengan alasan yang nggak pernah ditulis di dokumen teknis mana pun.",true,"2026-10-06T15:25:21.000Z",5,false,[17,18,19,20],"karier","framework","opini","pengalaman",null,"\u002Fog\u002Fketika-pilih-framework-cuma-biar-kelihatan-beda.png",{"id":24,"title":25,"title_id":26,"slug":27},9,"Articles","Artikel","all",[],[30,46,67],{"collection":31,"item":32},"series",{"__typename":31,"title":25,"title_id":26,"slug":27,"children_series":33},[34,38,42],{"title":35,"title_id":36,"slug":37},"Artificial Intelligence","Kecerdasan Artifisial","kecerdasan-artifisial",{"title":39,"title_id":40,"slug":41},"Programming Fundamentals","Konsep Dasar Pemrograman","konsep-dasar-pemrograman",{"title":43,"title_id":44,"slug":45},"Algorithms and Data Structures","Algoritma dan Struktur Data","algoritma-struktur-data",{"collection":31,"item":47},{"__typename":31,"title":48,"title_id":48,"slug":49,"children_series":50},"Tutorial","tutorial",[51,55,59,63],{"title":52,"title_id":53,"slug":54},"Learning Python","Belajar Python","belajar-python",{"title":56,"title_id":57,"slug":58},"Learning Go","Belajar Golang","belajar-golang",{"title":60,"title_id":61,"slug":62},"Learning Java","Belajar Java","belajar-java",{"title":64,"title_id":65,"slug":66},"Learning Pascal","Belajar Pascal","belajar-pascal",{"collection":31,"item":68},{"__typename":31,"title":69,"title_id":69,"slug":70,"children_series":71},"Lab","lab",[],{"article":73,"renderedBody":124,"renderedTakeaway":125,"latestArticles":126,"toc":222},{"id":74,"title":75,"title_id":76,"slug":77,"excerpt":78,"excerpt_id":79,"has_translation":12,"published_at":80,"reading_time":81,"hidden_from_listing":15,"tags":82,"thumbnail_image":21,"og_image":87,"series":88,"authors":116,"seoTitle":21,"seoDescription":21,"body_locale":119,"available_locales":120,"body":122,"takeway":123,"prerequisite":21},47,"Why Understanding Algorithms and Data Structures Actually Matters","Pentingnya Memahami Algoritma dan Struktur Data","pentingnya-memahami-algoritma-dan-struktur-data","An algorithm is an ordered list of steps, and that order decides how expensive a problem is. The examples are on the back of an instant noodle packet, in a factorial, and behind ctrl+z.","Sebagai konsep fundamental, algoritma menentukan seberapa mahal sebuah masalah diselesaikan. Contohnya ada di bungkus mie instan, di bilangan faktorial, dan di tombol undo.","2026-11-19T01:00:00.000Z",7,[83,84,85,86],"algoritma","struktur-data","konsep","dasar","\u002Fog\u002Fpentingnya-memahami-algoritma-dan-struktur-data.png",{"id":89,"title":90,"title_id":91,"slug":92,"description":93,"description_id":94,"articles":95,"children_series":105,"parent_series":106},27,"About Algorithms and Data Structures","Tentang Algoritma dan Struktur Data","asd-intro","Why algorithms and data structures matter, and why learning them isn't just to pass a course.","Kenapa algoritma dan struktur data penting, dan kenapa belajar keduanya bukan cuma buat lulus mata kuliah.",[96],{"id":74,"title":75,"title_id":76,"slug":77,"excerpt":78,"excerpt_id":79,"has_translation":12,"published_at":80,"reading_time":81,"hidden_from_listing":15,"tags":82,"thumbnail_image":21,"og_image":87,"series":97,"authors":98},{"id":89,"title":90,"title_id":91,"slug":92},[99],{"authors_id":100},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},1,"Daffa Izzuddin","izzudd","Writer",[],{"id":107,"title":43,"title_id":44,"slug":45,"parent_series":108,"children_series":109},15,{"id":24,"title":25,"title_id":26,"slug":27},[110,111],{"id":89,"title":90,"title_id":91,"slug":92,"cover_image":21},{"id":112,"title":113,"title_id":114,"slug":115,"cover_image":21},28,"Linear Data Structures","Struktur Data Linear","asd-struktur-linear",[117],{"authors_id":118},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},"en",[119,121],"id","\nThe code runs, the test you wrote passes, and the page still crawls once the data is real. Nothing in the file looks broken. The order of the steps is, and so is the shape the data sits in. Those two choices decide how expensive a problem gets, and nobody reopens them until the slowdown is already on someone's screen.\n\n## About Algorithms\n\nYou can write code that runs, passes your quick test, and still uses the wrong tool for the job. Most of the time that tool is an algorithm or a data structure. This article covers why those two matter, with a few small examples.\n\nInformally, an **algorithm** is the list of steps you follow to get something done. That's all. Nothing special.\n\nThe everyday example is printed on the back of an instant noodle package. Boil water, add noodles, wait, add seasoning. Yes, that is an algorithm too.\n\nFor a more technical one, take the factorial. You know, the number with an exclamation mark after it.\n\nNow imagine explaining the factorial to someone who has never heard of it. They do understand variables, multiplication and subtraction. With only those tools, you can design an algorithm that produces the answer. It goes roughly like this:\n\n1. Pick the number you want the factorial of and store it in a variable `n`.\n2. Create a variable `x` with the value 1.\n3. Multiply `x` by `n` and store the result back in `x`.\n4. Subtract 1 from `n` and store the result back in `n`.\n5. If `n` is greater than 1, go back to step 3. Otherwise, return `x` as the factorial.\n\nThat is the algorithm written for humans. A computer needs it in a language it understands, so here it is as Java 21:\n\n```java\npublic class Factorial {\n  static long factorial(int n) {\n    long x = 1;\n    while (n > 1) {\n      x = x * n;\n      n = n - 1;\n    }\n    return x;\n  }\n\n  public static void main(String[] args) {\n    System.out.println(factorial(5));\n    System.out.println(factorial(10));\n  }\n}\n```\n\nI compiled and ran this on javac 21. It printed:\n\n```plain\n120\n3628800\n```\n\nOne small difference from the five steps: the `while` loop checks `n > 1` before the first multiplication, not after. The steps check at the end.\n\nThis algorithm is not perfect, and some inputs break it. Negative numbers don't have a factorial, and an `int` can't hold a fraction, so the code as written does not handle either. An algorithm does not have to be perfect. It has to be good enough for the **requirement** it serves. If your program only ever asks for the factorial of 5 or 10, you are done.\n\n## About Data Structures\n\nIf an algorithm is about the steps you take on data, a **data structure** is about how that data is stored and arranged. The goal is to lay data out so the algorithm has to do as little work as possible.\n\nTake an array and a linked list. An array is contiguous and indexed, so reading item 500 is a jump straight to it. That is O(1) random access. A linked list has to walk its nodes one by one to get there. Same data, different layout, very different work for the same question.\n\nYou will usually meet four families:\n\n1. **Linear**: stored in a line. Examples: array, queue, stack, linked list.\n2. **Tree**: stored in branches, like a hierarchy. Examples: binary tree, heap, AVL tree.\n3. **Graph**: stored as items connected to other items.\n4. **Hash**: stored scattered across slots, using a *hash function* to pick the slot.\n\nEach structure comes with its own algorithms. You can't pair them at random, because each pairing only works under certain conditions. Algorithm and data structure support each other. Treat them as one unit, not two separate choices.\n\n## Why This Matters\n\nThe core of programming is **choosing** the right pair of algorithm and data structure for a problem. That's it. Just pick one, right?\n\nThe real answer is not that simple.\n\nBefore you can pick the right pair, you need to know what shape your data has and how each algorithm behaves. Only then can you match them to the problem.\n\nTake social media apps like Instagram and Facebook. They share one thing: relationships between users, whether friends, followers or subscribers. If you know data structures, you immediately think *graph*. Social graphs are the standard example. Each user is a *node*, and each relationship (friend, follower, subscriber) is an *edge*.\n\nKnowing the data structure first is a good start. It narrows the list of algorithms you can use. Choosing a data structure is also easier than choosing an algorithm.\n\nGet the pair right and your program tends to be more efficient, easier to scale and easier to read.\n\n### Code Efficiency\n\nEfficiency in programming means two things: space and time. Use as little memory as you can, and run as fast as you can. (Yes, we may also destabilize the *space-time continuum* along the way. Just kidding.)\n\nThe usual yardstick is **Big O** notation. Look it up when you have a minute. For now, it describes how much work an algorithm does as the input grows, usually in the worst case. The right algorithm and data structure are designed to keep that number small.\n\nHere is an example. You are asked to add up the consecutive numbers starting from 1:\n\n$$\nS_n = 1 + 2 + 3 + ... + (n-1) + n\n$$\n\nWritten as a loop, it looks like this. Right next to it is the closed form, `n * (n + 1) \u002F 2`:\n\n```java\npublic class SumRange {\n  static long withLoop(int n) {\n    long total = 0;\n    for (int i = 1; i \u003C= n; i++) {\n      total += i;\n    }\n    return total;\n  }\n\n  static long withFormula(int n) {\n    return (long) n * (n + 1) \u002F 2;\n  }\n\n  public static void main(String[] args) {\n    System.out.println(withLoop(100) + \" \" + withFormula(100));\n    System.out.println(withLoop(1_000_000) + \" \" + withFormula(1_000_000));\n  }\n}\n```\n\nBoth versions printed the same answers:\n\n```plain\n5050 5050\n500000500000 500000500000\n```\n\nWhat I could verify: the two versions agree on those two inputs, on javac 21. I did not test other inputs.\n\nThe loop is correct, but it does more work than it needs to. It adds once per number, so it performs `n` additions. Its complexity is **O(n)**.\n\nThe formula is a different story. Whatever `n` is, it does a constant number of operations and has no loop. Its complexity is **O(1)**, or constant.\n\n### Easier Code\n\nAlgorithms and data structures often mirror things in the world around you. When you pick the right one, your logic makes sense from the start.\n\nThe easy example is the **stack**. Picture a pile of plates. You take the top one, because that takes the least effort. When you add a plate, you put it on top, for the same reason. A stack works exactly like that: last in, first out.\n\nYou use a stack more often than you think. Take the undo feature, the `ctrl+z` one. Each action you perform goes onto a stack. Each time you press undo, an action comes off, one at a time. Exactly like the pile of plates.\n\nWhen you write code, picturing something like this helps you understand the problem. Connect it to something you already know, then pick the data structure that fits.\n\n## What Next\n\nNothing in this world is instant, not even making instant noodles.\n\nLearning to program is the same. Knowing a language and its syntax is not enough. You need to know how to solve problems. After that, you still need to learn how to make your solutions efficient. Even that isn't the end, because the field keeps moving and you keep learning.\n\nThat's why practice hours matter. The more problems you solve, the better your algorithms get.\n\nReading other people's code helps too. Everyone thinks differently, and reading how someone else solved a problem shows you alternatives you would not have found alone.\n\nSites like [HackerRank](https:\u002F\u002Fwww.hackerrank.com\u002F), [Sololearn](https:\u002F\u002Fwww.sololearn.com\u002F) and [LeetCode](https:\u002F\u002Fleetcode.com\u002Fproblemset\u002Fall\u002F) are good places to sharpen this. Try a few problems and read other people's solutions afterward.\n\nPick one problem this week, solve it, then read someone else's answer to the same problem. Happy coding 👋\n","- An algorithm is a sequence of steps, and that sequence decides how expensive a problem turns out to be.\n- A data structure decides how the data is laid out, so the algorithm can do as little work as possible.\n- Choosing the pair is easier once you know the shape of the data: a consecutive series fits an array, relationships between users need a graph.\n- An algorithm does not have to be perfect. It has to be good enough for the requirement in front of you.","\u003Cp>The code runs, the test you wrote passes, and the page still crawls once the data is real. Nothing in the file looks broken. The order of the steps is, and so is the shape the data sits in. Those two choices decide how expensive a problem gets, and nobody reopens them until the slowdown is already on someone&#39;s screen.\u003C\u002Fp>\n\u003Ch2 id=\"about-algorithms\">About Algorithms\u003C\u002Fh2>\n\u003Cp>You can write code that runs, passes your quick test, and still uses the wrong tool for the job. Most of the time that tool is an algorithm or a data structure. This article covers why those two matter, with a few small examples.\u003C\u002Fp>\n\u003Cp>Informally, an \u003Cstrong>algorithm\u003C\u002Fstrong> is the list of steps you follow to get something done. That&#39;s all. Nothing special.\u003C\u002Fp>\n\u003Cp>The everyday example is printed on the back of an instant noodle package. Boil water, add noodles, wait, add seasoning. Yes, that is an algorithm too.\u003C\u002Fp>\n\u003Cp>For a more technical one, take the factorial. You know, the number with an exclamation mark after it.\u003C\u002Fp>\n\u003Cp>Now imagine explaining the factorial to someone who has never heard of it. They do understand variables, multiplication and subtraction. With only those tools, you can design an algorithm that produces the answer. It goes roughly like this:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Pick the number you want the factorial of and store it in a variable \u003Ccode>n\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Create a variable \u003Ccode>x\u003C\u002Fcode> with the value 1.\u003C\u002Fli>\n\u003Cli>Multiply \u003Ccode>x\u003C\u002Fcode> by \u003Ccode>n\u003C\u002Fcode> and store the result back in \u003Ccode>x\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Subtract 1 from \u003Ccode>n\u003C\u002Fcode> and store the result back in \u003Ccode>n\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>If \u003Ccode>n\u003C\u002Fcode> is greater than 1, go back to step 3. Otherwise, return \u003Ccode>x\u003C\u002Fcode> as the factorial.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>That is the algorithm written for humans. A computer needs it in a language it understands, so here it is as Java 21:\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">JAVA\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"public%20class%20Factorial%20%7B%0A%20%20static%20long%20factorial(int%20n)%20%7B%0A%20%20%20%20long%20x%20%3D%201%3B%0A%20%20%20%20while%20(n%20%3E%201)%20%7B%0A%20%20%20%20%20%20x%20%3D%20x%20*%20n%3B%0A%20%20%20%20%20%20n%20%3D%20n%20-%201%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20x%3B%0A%20%20%7D%0A%0A%20%20public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%20%20%20%20System.out.println(factorial(5))%3B%0A%20%20%20%20System.out.println(factorial(10))%3B%0A%20%20%7D%0A%7D\" title=\"Salin kode\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>public class Factorial {\n  static long factorial(int n) {\n    long x = 1;\n    while (n &gt; 1) {\n      x = x * n;\n      n = n - 1;\n    }\n    return x;\n  }\n\n  public static void main(String[] args) {\n    System.out.println(factorial(5));\n    System.out.println(factorial(10));\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>I compiled and ran this on javac 21. It printed:\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">PLAIN\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"120%0A3628800\" title=\"Salin kode\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>120\n3628800\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>One small difference from the five steps: the \u003Ccode>while\u003C\u002Fcode> loop checks \u003Ccode>n &gt; 1\u003C\u002Fcode> before the first multiplication, not after. The steps check at the end.\u003C\u002Fp>\n\u003Cp>This algorithm is not perfect, and some inputs break it. Negative numbers don&#39;t have a factorial, and an \u003Ccode>int\u003C\u002Fcode> can&#39;t hold a fraction, so the code as written does not handle either. An algorithm does not have to be perfect. It has to be good enough for the \u003Cstrong>requirement\u003C\u002Fstrong> it serves. If your program only ever asks for the factorial of 5 or 10, you are done.\u003C\u002Fp>\n\u003Ch2 id=\"about-data-structures\">About Data Structures\u003C\u002Fh2>\n\u003Cp>If an algorithm is about the steps you take on data, a \u003Cstrong>data structure\u003C\u002Fstrong> is about how that data is stored and arranged. The goal is to lay data out so the algorithm has to do as little work as possible.\u003C\u002Fp>\n\u003Cp>Take an array and a linked list. An array is contiguous and indexed, so reading item 500 is a jump straight to it. That is O(1) random access. A linked list has to walk its nodes one by one to get there. Same data, different layout, very different work for the same question.\u003C\u002Fp>\n\u003Cp>You will usually meet four families:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Linear\u003C\u002Fstrong>: stored in a line. Examples: array, queue, stack, linked list.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Tree\u003C\u002Fstrong>: stored in branches, like a hierarchy. Examples: binary tree, heap, AVL tree.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Graph\u003C\u002Fstrong>: stored as items connected to other items.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Hash\u003C\u002Fstrong>: stored scattered across slots, using a \u003Cem>hash function\u003C\u002Fem> to pick the slot.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Each structure comes with its own algorithms. You can&#39;t pair them at random, because each pairing only works under certain conditions. Algorithm and data structure support each other. Treat them as one unit, not two separate choices.\u003C\u002Fp>\n\u003Ch2 id=\"why-this-matters\">Why This Matters\u003C\u002Fh2>\n\u003Cp>The core of programming is \u003Cstrong>choosing\u003C\u002Fstrong> the right pair of algorithm and data structure for a problem. That&#39;s it. Just pick one, right?\u003C\u002Fp>\n\u003Cp>The real answer is not that simple.\u003C\u002Fp>\n\u003Cp>Before you can pick the right pair, you need to know what shape your data has and how each algorithm behaves. Only then can you match them to the problem.\u003C\u002Fp>\n\u003Cp>Take social media apps like Instagram and Facebook. They share one thing: relationships between users, whether friends, followers or subscribers. If you know data structures, you immediately think \u003Cem>graph\u003C\u002Fem>. Social graphs are the standard example. Each user is a \u003Cem>node\u003C\u002Fem>, and each relationship (friend, follower, subscriber) is an \u003Cem>edge\u003C\u002Fem>.\u003C\u002Fp>\n\u003Cp>Knowing the data structure first is a good start. It narrows the list of algorithms you can use. Choosing a data structure is also easier than choosing an algorithm.\u003C\u002Fp>\n\u003Cp>Get the pair right and your program tends to be more efficient, easier to scale and easier to read.\u003C\u002Fp>\n\u003Ch3 id=\"code-efficiency\">Code Efficiency\u003C\u002Fh3>\n\u003Cp>Efficiency in programming means two things: space and time. Use as little memory as you can, and run as fast as you can. (Yes, we may also destabilize the \u003Cem>space-time continuum\u003C\u002Fem> along the way. Just kidding.)\u003C\u002Fp>\n\u003Cp>The usual yardstick is \u003Cstrong>Big O\u003C\u002Fstrong> notation. Look it up when you have a minute. For now, it describes how much work an algorithm does as the input grows, usually in the worst case. The right algorithm and data structure are designed to keep that number small.\u003C\u002Fp>\n\u003Cp>Here is an example. You are asked to add up the consecutive numbers starting from 1:\u003C\u002Fp>\n\u003Cspan class=\"katex-display\">\u003Cspan class=\"katex\">\u003Cspan class=\"katex-mathml\">\u003Cmath xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML\" display=\"block\">\u003Csemantics>\u003Cmrow>\u003Cmsub>\u003Cmi>S\u003C\u002Fmi>\u003Cmi>n\u003C\u002Fmi>\u003C\u002Fmsub>\u003Cmo>=\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo>+\u003C\u002Fmo>\u003Cmn>2\u003C\u002Fmn>\u003Cmo>+\u003C\u002Fmo>\u003Cmn>3\u003C\u002Fmn>\u003Cmo>+\u003C\u002Fmo>\u003Cmi mathvariant=\"normal\">.\u003C\u002Fmi>\u003Cmi mathvariant=\"normal\">.\u003C\u002Fmi>\u003Cmi mathvariant=\"normal\">.\u003C\u002Fmi>\u003Cmo>+\u003C\u002Fmo>\u003Cmo stretchy=\"false\">(\u003C\u002Fmo>\u003Cmi>n\u003C\u002Fmi>\u003Cmo>−\u003C\u002Fmo>\u003Cmn>1\u003C\u002Fmn>\u003Cmo stretchy=\"false\">)\u003C\u002Fmo>\u003Cmo>+\u003C\u002Fmo>\u003Cmi>n\u003C\u002Fmi>\u003C\u002Fmrow>\u003Cannotation encoding=\"application\u002Fx-tex\">S_n = 1 + 2 + 3 + ... + (n-1) + n\u003C\u002Fannotation>\u003C\u002Fsemantics>\u003C\u002Fmath>\u003C\u002Fspan>\u003Cspan class=\"katex-html\" aria-hidden=\"true\">\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:0.8333em;vertical-align:-0.15em;\">\u003C\u002Fspan>\u003Cspan class=\"mord\">\u003Cspan class=\"mord mathnormal\" style=\"margin-right:0.0576em;\">S\u003C\u002Fspan>\u003Cspan class=\"msupsub\">\u003Cspan class=\"vlist-t vlist-t2\">\u003Cspan class=\"vlist-r\">\u003Cspan class=\"vlist\" style=\"height:0.1514em;\">\u003Cspan style=\"top:-2.55em;margin-left:-0.0576em;margin-right:0.05em;\">\u003Cspan class=\"pstrut\" style=\"height:2.7em;\">\u003C\u002Fspan>\u003Cspan class=\"katex-sizing reset-size6 size3 mtight\">\u003Cspan class=\"mord mathnormal mtight\">n\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"vlist-s\">​\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"vlist-r\">\u003Cspan class=\"vlist\" style=\"height:0.15em;\">\u003Cspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2778em;\">\u003C\u002Fspan>\u003Cspan class=\"mrel\">=\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2778em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:0.7278em;vertical-align:-0.0833em;\">\u003C\u002Fspan>\u003Cspan class=\"mord\">1\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003Cspan class=\"mbin\">+\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:0.7278em;vertical-align:-0.0833em;\">\u003C\u002Fspan>\u003Cspan class=\"mord\">2\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003Cspan class=\"mbin\">+\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:0.7278em;vertical-align:-0.0833em;\">\u003C\u002Fspan>\u003Cspan class=\"mord\">3\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003Cspan class=\"mbin\">+\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:0.6667em;vertical-align:-0.0833em;\">\u003C\u002Fspan>\u003Cspan class=\"mord\">...\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003Cspan class=\"mbin\">+\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:1em;vertical-align:-0.25em;\">\u003C\u002Fspan>\u003Cspan class=\"mopen\">(\u003C\u002Fspan>\u003Cspan class=\"mord mathnormal\">n\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003Cspan class=\"mbin\">−\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:1em;vertical-align:-0.25em;\">\u003C\u002Fspan>\u003Cspan class=\"mord\">1\u003C\u002Fspan>\u003Cspan class=\"mclose\">)\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003Cspan class=\"mbin\">+\u003C\u002Fspan>\u003Cspan class=\"mspace\" style=\"margin-right:0.2222em;\">\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan class=\"katex-base\">\u003Cspan class=\"katex-strut\" style=\"height:0.4306em;\">\u003C\u002Fspan>\u003Cspan class=\"mord mathnormal\">n\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cp>Written as a loop, it looks like this. Right next to it is the closed form, \u003Ccode>n * (n + 1) \u002F 2\u003C\u002Fcode>:\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">JAVA\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"public%20class%20SumRange%20%7B%0A%20%20static%20long%20withLoop(int%20n)%20%7B%0A%20%20%20%20long%20total%20%3D%200%3B%0A%20%20%20%20for%20(int%20i%20%3D%201%3B%20i%20%3C%3D%20n%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20total%20%2B%3D%20i%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20total%3B%0A%20%20%7D%0A%0A%20%20static%20long%20withFormula(int%20n)%20%7B%0A%20%20%20%20return%20(long)%20n%20*%20(n%20%2B%201)%20%2F%202%3B%0A%20%20%7D%0A%0A%20%20public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%20%20%20%20System.out.println(withLoop(100)%20%2B%20%22%20%22%20%2B%20withFormula(100))%3B%0A%20%20%20%20System.out.println(withLoop(1_000_000)%20%2B%20%22%20%22%20%2B%20withFormula(1_000_000))%3B%0A%20%20%7D%0A%7D\" title=\"Salin kode\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>public class SumRange {\n  static long withLoop(int n) {\n    long total = 0;\n    for (int i = 1; i &lt;= n; i++) {\n      total += i;\n    }\n    return total;\n  }\n\n  static long withFormula(int n) {\n    return (long) n * (n + 1) \u002F 2;\n  }\n\n  public static void main(String[] args) {\n    System.out.println(withLoop(100) + \" \" + withFormula(100));\n    System.out.println(withLoop(1_000_000) + \" \" + withFormula(1_000_000));\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>Both versions printed the same answers:\u003C\u002Fp>\n\n\u003Cdiv class=\"code-block-wrapper my-6 not-prose rounded-xl border-2 border-black dark:border-gray-600 shadow-neo overflow-hidden bg-[#24292e] text-[#e1e4e8] transition-all\">\n  \u003Cdiv class=\"code-block-header flex items-center justify-between px-4 py-2.5 bg-[#1f2428] border-b-2 border-black dark:border-gray-600 font-mono text-xs font-bold text-gray-300 select-none\">\n    \u003Cdiv class=\"flex items-center gap-2\">\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ff5f56] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#ffbd2e] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"w-3 h-3 rounded-full bg-[#27c93f] border border-black\u002F40 inline-block\">\u003C\u002Fspan>\n      \u003Cspan class=\"ml-2 font-mono font-bold text-xs uppercase tracking-wider text-gray-300\">PLAIN\u003C\u002Fspan>\n    \u003C\u002Fdiv>\n    \u003Cbutton type=\"button\" class=\"copy-code-btn flex items-center gap-1.5 px-3 py-1 text-xs font-bold bg-[#2f363d] text-gray-200 border-2 border-black dark:border-gray-500 rounded-lg shadow-neo-sm hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none hover:bg-gray-700 transition-all cursor-pointer\" data-code=\"5050%205050%0A500000500000%20500000500000\" title=\"Salin kode\">\n      \u003Csvg class=\"w-3.5 h-3.5 copy-icon-svg\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n        \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Cspan class=\"copy-text\">Copy\u003C\u002Fspan>\n    \u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"code-block-content p-4 overflow-x-auto text-sm font-mono leading-relaxed bg-[#24292e]\">\n    \u003Cpre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\">\u003Ccode>5050 5050\n500000500000 500000500000\u003C\u002Fcode>\u003C\u002Fpre>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\u003Cp>What I could verify: the two versions agree on those two inputs, on javac 21. I did not test other inputs.\u003C\u002Fp>\n\u003Cp>The loop is correct, but it does more work than it needs to. It adds once per number, so it performs \u003Ccode>n\u003C\u002Fcode> additions. Its complexity is \u003Cstrong>O(n)\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>The formula is a different story. Whatever \u003Ccode>n\u003C\u002Fcode> is, it does a constant number of operations and has no loop. Its complexity is \u003Cstrong>O(1)\u003C\u002Fstrong>, or constant.\u003C\u002Fp>\n\u003Ch3 id=\"easier-code\">Easier Code\u003C\u002Fh3>\n\u003Cp>Algorithms and data structures often mirror things in the world around you. When you pick the right one, your logic makes sense from the start.\u003C\u002Fp>\n\u003Cp>The easy example is the \u003Cstrong>stack\u003C\u002Fstrong>. Picture a pile of plates. You take the top one, because that takes the least effort. When you add a plate, you put it on top, for the same reason. A stack works exactly like that: last in, first out.\u003C\u002Fp>\n\u003Cp>You use a stack more often than you think. Take the undo feature, the \u003Ccode>ctrl+z\u003C\u002Fcode> one. Each action you perform goes onto a stack. Each time you press undo, an action comes off, one at a time. Exactly like the pile of plates.\u003C\u002Fp>\n\u003Cp>When you write code, picturing something like this helps you understand the problem. Connect it to something you already know, then pick the data structure that fits.\u003C\u002Fp>\n\u003Ch2 id=\"what-next\">What Next\u003C\u002Fh2>\n\u003Cp>Nothing in this world is instant, not even making instant noodles.\u003C\u002Fp>\n\u003Cp>Learning to program is the same. Knowing a language and its syntax is not enough. You need to know how to solve problems. After that, you still need to learn how to make your solutions efficient. Even that isn&#39;t the end, because the field keeps moving and you keep learning.\u003C\u002Fp>\n\u003Cp>That&#39;s why practice hours matter. The more problems you solve, the better your algorithms get.\u003C\u002Fp>\n\u003Cp>Reading other people&#39;s code helps too. Everyone thinks differently, and reading how someone else solved a problem shows you alternatives you would not have found alone.\u003C\u002Fp>\n\u003Cp>Sites like \u003Ca href=\"https:\u002F\u002Fwww.hackerrank.com\u002F\">HackerRank\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fwww.sololearn.com\u002F\">Sololearn\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fleetcode.com\u002Fproblemset\u002Fall\u002F\">LeetCode\u003C\u002Fa> are good places to sharpen this. Try a few problems and read other people&#39;s solutions afterward.\u003C\u002Fp>\n\u003Cp>Pick one problem this week, solve it, then read someone else&#39;s answer to the same problem. Happy coding 👋\u003C\u002Fp>\n","\u003Cul>\n\u003Cli>An algorithm is a sequence of steps, and that sequence decides how expensive a problem turns out to be.\u003C\u002Fli>\n\u003Cli>A data structure decides how the data is laid out, so the algorithm can do as little work as possible.\u003C\u002Fli>\n\u003Cli>Choosing the pair is easier once you know the shape of the data: a consecutive series fits an array, relationships between users need a graph.\u003C\u002Fli>\n\u003Cli>An algorithm does not have to be perfect. It has to be good enough for the requirement in front of you.\u003C\u002Fli>\n\u003C\u002Ful>\n",[127,144,149,167,184,204],{"id":128,"title":129,"title_id":130,"slug":131,"excerpt":132,"excerpt_id":133,"has_translation":12,"published_at":134,"reading_time":135,"hidden_from_listing":15,"tags":136,"thumbnail_image":21,"og_image":139,"series":140,"authors":141},48,"What a Linked List Actually Is","Tentang Struktur Data LinkedList","tentang-struktur-data-linked-list","A linked list is a linear chain of nodes, each holding data and a pointer to the next node. Here is what that chain costs next to an array, plus a minimal implementation you can run.","Linked list adalah rantai linear berisi node, dan setiap node menyimpan data plus pointer ke node berikutnya. Ini ongkosnya dibanding array, plus implementasi paling sederhananya.","2026-11-21T01:00:00.000Z",3,[84,137,138,85],"linked-list","pointer","\u002Fog\u002Ftentang-struktur-data-linked-list.png",{"id":112,"title":113,"title_id":114,"slug":115},[142],{"authors_id":143},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},{"id":74,"title":75,"title_id":76,"slug":77,"excerpt":78,"excerpt_id":79,"has_translation":12,"published_at":80,"reading_time":81,"hidden_from_listing":15,"tags":82,"thumbnail_image":21,"og_image":87,"series":145,"authors":146},{"id":89,"title":90,"title_id":91,"slug":92},[147],{"authors_id":148},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},{"id":150,"title":151,"title_id":152,"slug":153,"excerpt":154,"excerpt_id":155,"has_translation":12,"published_at":156,"reading_time":14,"hidden_from_listing":15,"tags":157,"thumbnail_image":21,"og_image":162,"series":163,"authors":164},108,"At 11 a.m. the AI Quota Runs Out, and the Work Stops There","Jam 11 siang kuota AI-nya habis, dan kerjaan berhenti di situ","jam-11-kuota-ai-habis-kerjaan-berhenti","The panel says the usage limit is reached and the work stops, not because it is finished. Three guesses explain it, and all three are wrong: the limit is shaped like a cliff, and the day is built on top of one tool.","Panel di layar bilang batas pemakaian tercapai, dan kerja berhenti di situ. Bukan karena selesai. Ada tiga tebakan kenapa ini terjadi, dan ketiganya salah: batasnya berbentuk tebing, dan harinya dibangun di atas satu alat.","2026-11-12T01:00:00.000Z",[158,159,160,161],"ai","tooling","rate-limit","produktivitas","\u002Fog\u002Fjam-11-kuota-ai-habis-kerjaan-berhenti.png",{"id":24,"title":25,"title_id":26,"slug":27},[165],{"authors_id":166},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},{"id":168,"title":169,"title_id":170,"slug":171,"excerpt":172,"excerpt_id":173,"has_translation":12,"published_at":174,"reading_time":14,"hidden_from_listing":15,"tags":175,"thumbnail_image":21,"og_image":178,"series":179,"authors":181},139,"Python Classes: the History Every Account Shared","Python Class: Riwayat yang Dipakai Bersama Semua Akun","python-class-object","Two accounts, and each history lists the other account's deposits. The list sat in the class body, `append` never writes to the object, so both accounts appended into the same one.","Dua akun, dan riwayat masing-masing memuat setoran akun lain. List-nya duduk di body class, `append` tidak pernah menulis ke objek, jadi kedua akun menambah ke list yang sama.","2026-11-07T01:00:00.000Z",[176,177],"python","oop","\u002Fog\u002Fpython-class-object.png",{"id":180,"title":52,"title_id":53,"slug":54},10,[182],{"authors_id":183},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},{"id":185,"title":186,"title_id":187,"slug":188,"excerpt":189,"excerpt_id":190,"has_translation":12,"published_at":191,"reading_time":14,"hidden_from_listing":15,"tags":192,"thumbnail_image":21,"og_image":195,"series":196,"authors":201},137,"Java Operators: the Average That Came Out a Whole Number","Operator Java: Rata-Rata yang Keluar Sebagai Bilangan Bulat","java-operators","Three scores, one division, and the average prints as 82. Both operands are `int`, so the fraction is cut off, and the obvious cast prints `82.0` without fixing anything.","Tiga nilai, satu pembagian, dan rata-ratanya tercetak 82. Kedua operand-nya `int`, jadi pecahannya dipotong, dan cast yang paling wajar malah mencetak `82.0` tanpa memperbaiki apa pun.","2026-11-06T01:00:00.000Z",[193,194],"java","operator","\u002Fog\u002Fjava-operators.png",{"id":197,"title":198,"title_id":199,"slug":200},22,"Variables, Types, and Operations","Variabel, Tipe Data, dan Operasi","java-variabel-tipe-data",[202],{"authors_id":203},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},{"id":205,"title":206,"title_id":207,"slug":208,"excerpt":209,"excerpt_id":210,"has_translation":12,"published_at":191,"reading_time":81,"hidden_from_listing":15,"tags":211,"thumbnail_image":21,"og_image":213,"series":214,"authors":219},136,"Python Modules: the Import That Printed the Report","Modul Python: Import yang Mencetak Laporannya","python-modules","You pull one function out into its own file, import it, and the whole report runs again and eats your input. A module is a file, `import` runs it top to bottom, and one line decides which of the two jobs it is doing.","Kamu memindahkan satu fungsi ke file sendiri, meng-import-nya, dan seluruh laporan jalan lagi lalu memakan inputmu. Modul adalah file, `import` menjalankannya dari atas ke bawah, dan satu baris menentukan pekerjaan mana yang sedang dijalankan file itu.",[176,212],"modules","\u002Fog\u002Fpython-modules.png",{"id":215,"title":216,"title_id":217,"slug":218},18,"Working with Python Scripts","Menggunakan Script Python","python-pemrograman-dengan-script",[220],{"authors_id":221},{"id":101,"name":102,"slug":103,"role":104,"profile_picture":21},[223,227,230,233,236,239],{"text":224,"depth":225,"id":226},"About Algorithms",2,"about-algorithms",{"text":228,"depth":225,"id":229},"About Data Structures","about-data-structures",{"text":231,"depth":225,"id":232},"Why This Matters","why-this-matters",{"text":234,"depth":135,"id":235},"Code Efficiency","code-efficiency",{"text":237,"depth":135,"id":238},"Easier Code","easier-code",{"text":240,"depth":225,"id":241},"What Next","what-next",1794029326101]