Home Tags Posts tagged with "Trivia"
Tag:

Trivia

Some general stuff

  • ArraysTheory

    Array Data Structure

    by nikoo28
    5 minutes read

    An array is the most basic data structure one can think of. It may seem very easy to use and in a lot of my posts we have been solving problems using arrays. However, if you are just getting started with programming this post is probably for you. I would like to cover some of the basic concepts that makes this data structure so desirable and easy to use. If you have been programming for a while now this post is probably not written for you. Read along keeping that…

    1 FacebookTwitterLinkedinWhatsappEmail
  • Theory

    What is the Big O notation? [Simplified]

    by nikoo28
    8 minutes read

    As soon as you hear the word ‘Big O’, does your mind go “Oh my god! Oh no! This again?” The next thing following it would be time complexity and what not. Suddenly, your brain starts getting this confusing signals and you lose track of what is happening. If you have felt this at some point of time while learning programming, then I want to tell you that you are not alone. In fact, you are proceeding in the right direction. But all these notations can start to get overwhelming…

    0 FacebookTwitterLinkedinWhatsappEmail
  • Theory

    What is the Time Complexity of an Algorithm?

    by nikoo28
    5 minutes read

    Time complexity is an important criteria when determining the quality of an algorithm. An algorithm is better if it produces the same result in a less time for the same input test cases. However, one must take care of the type of input data used. Some input data can give you false positives. Let us take an example to understand this better. You have an algorithm that is sorts a list of numbers. If the input data you provide to this algorithm is already sorted. Then this algorithm gives you…

    0 FacebookTwitterLinkedinWhatsappEmail
  • Theory

    How do you compare two algorithms?

    by nikoo28
    8 minutes read

    We compare things all the time to determine which one is better over the other. The best example is when you are buying stuff online, we compare prices across websites, two different mobile phones, or even two different outfits. We know that there are different techniques of solving a problem in computer science: Brute Force Divide and Conquer Greedy Dynamic Programming Naturally, when we try to solve a problem with different methods, one would want to compare them. Once they are put side to side, we can then analyze which…

    0 FacebookTwitterLinkedinWhatsappEmail
  • Theory

    Algorithmic Paradigms – Brute Force

    by nikoo28
    5 minutes read

    Brute force method would probably be the favorite algorithmic paradigm of every developer. The beauty of a brute force method is that it is pretty straightforward and if a solution to a problem exists, you are guaranteed to find it. This option is also the most exhaustive option as we might go through all the possibilities before arriving at the result. What is Brute Force Method? You might have heard the phrase “Brute force method to solve the problem”. What exactly do you mean by that? It simply means that…

    0 FacebookTwitterLinkedinWhatsappEmail
  • What comes to your mind when you think about divide and conquer? Do you think about wars? A strategy? A way you can split up your forces and then conquer the enemy? I am here to tell you that is exactly right. Luckily, in computer science you don’t have to deal with weapons and artillery. There are several ways to approach a problem. Divide and conquer is one of them. In our case a problem statement is our enemy. We need to break it into parts (divide) and then solve…

    0 FacebookTwitterLinkedinWhatsappEmail
  • MiscStrings

    Common String Algorithms

    by nikoo28
    2 minutes read

    In this post, I would try to implement the following string-related algorithm questions. I would like to implement these using Java and try to make additional comments which I think that are useful for understanding the implementations of some type of data structures in Java programming language. Non Repeated Characters in String : Return the unique characters in a given letter. Anagram Strings : Given two strings, check if they’re anagrams or not. Two strings are anagrams if they are written using the same exact letters, ignoring space, punctuation and…

    0 FacebookTwitterLinkedinWhatsappEmail
  • Here we will discuss the easiest and most simple way to change case of alphabets. Hint : We will be using bit hacks. Often during our programming needs we need to change the case of alphabets. This can be a problem requirement or simply our need to solve the question. There are several ways to do it, but what can be more beautiful than using bit hacks for the same. We discusses some of the BIT Hacks in these posts:- Low Level Bit Hacks Some advanced Bit Hacks Here I…

    0 FacebookTwitterLinkedinWhatsappEmail

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More