If You are an iOS Developer , you must take a look here . You will find this article very helpfull .

Why This Article ?

The time when I was exploring about AVFoundation , for a good examples and documentation , there was literally no such explanations and documentation . There are some but very poorly written .

Image for post
Image for post
Overview

Objective of This Article

We are going to understand the AVFoundation and Implement that in an SwiftUI app project . We will follow the MVVM pattern . And Line by Line Understanding of Code .

Sources and Codes

Below is the repository for this project , just give it a star and…


In this article, we will take a very short look at the implementation of MVVM architecture with an example project.

Source Code: GitHub

Introduction

Here you will learn about how UI logic is separated from core application logic by taking your first look at the MVVM architecture pattern. MVVM is a widely used design pattern that allows us to separate core application logic from UI logic.

Image for post
Image for post

Model: This is your core model, which will contain all data that you may have consumed from a database or via an external API.

ViewModel: A stripped-down or UI-tailored representation of your Model that contains…


Some basic things about BITs and its Manipulation

Image for post
Image for post
unDraw

To play with Bits , you must be familiar with binary numbers , and their operations like addition , subtraction etc .

Bit Operators

NOT ( ~ )

Bitwise NOT is an unary operator that flips the bits of the number i.e., if the ith bit is 0, it will change it to 1 and vice versa. Bitwise NOT is nothing but simply the one’s complement of a number. Lets take an example.


In this article you will see how to solve knapsack problem by memoization .

Image for post
Image for post
Photo by Markus Spiske on Unsplash

Problem Statement

You have given a bag of capacity ‘W’ . And also you have ’n’ items with ‘w’ weights and ‘v’ values . You need to fill the bag with maximum values without crossing the capacity weight .

Recursive Approach

In this approach , we will try to find all the possibilities using recursion .

def knapSack(W, wt, val, n): if n == 0 or W == 0 : return 0 if (wt[n-1] > W): return knapSack(W, wt, val, n-1) else: return max(val[n-1] + knapSack(W-wt[n-1], wt, val, n-1),knapSack(W…


In this article , we will look on how we can use dynamic programming to come up with a solution of polynomial instead of exponential .

Image for post
Image for post

Let’s DO That !

This is the one of the best example to implement DP . And it is quite famous .
Lets begin

Problem Statement :

Given two strings: string X of length m [X(1..m)], and string Y of length n [Y(1..n)], find the longest common subsequence: the longest sequence of characters that appear left-to-right (but not necessarily in a contiguous block) in both strings. For example, if X = “ABCBDAB” and Y = “BDCABA”, the LCS(X, Y) = {“BCBA”…


Explanation with examples . Just take a look and let me know your thought about it !

Overview

Dynamic programming and memoization work together. The main difference between dynamic programming and divide and conquer is that in the case of the latter, sub problems are independent, whereas in DP there can be an overlap of sub problems.

Image for post
Image for post
from unDraw

By using memoization [maintaining a table of sub problems already solved], dynamic programming reduces the exponential complexity to polynomial complexity (O(n 2 ), O(n 3 ), etc.) for many problems .

Components of Dynamic Programming

Generally Dynamic Programming has two components :

            Dynamic Programming = Recursion + Memoization

Properties of Dynamic Programming Strategy


In This Article I have Covered 40 Questions | Swift Programming

Image for post
Image for post

1. What is Type Inference ?

In short its an ability of swift . You dont always need to write types of variables and constant you making in your code . For example :

// swift know its Int type
var age = 40 // Int
// You dont need to tell them always like below
var age : Int = 40

2. What is Generics ?

Generic code enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define.

Understanding it with an example :

Suppose you want to swap to values of type Int…


Enjoy the Article 😇 , its short and clean !

Overview

The path I was following to look up the backend , includes the following :

  • Node JS
  • Express JS
  • Packages

Note : This Article will Only Include some Basic Overviews only !

Image for post
Image for post

Introduction

Starting from Node JS , Node.js is an open-source, cross-platform, back-end, JavaScript runtime environment .

Creating Our Own Server

Now we will create a HTTP server listening on port 3000 , which sends Hello, World! to the browser. …


We will try to create our own array that is custom and powerful !

Custom Sorted Array

Here we will creating a type of array that take elements and sort on their own . Both the integers and strings .

You only need to give them elements , and they will store in sorted form , even if it is a string !

Where to Go From Here

My LinkedIn : linkedin.com/in/my-pro-file

Check This : https://bit.ly/38k4w7l

In order to Get Connected and Read those useful articles , Follow me Here .

Thank You !
Mohammad Yasir

Image for post
Image for post


Here are some basics and important knowledge about OS that every developer should know !

Before We Start !

Image for post
Image for post

What is OS in Simple ?

An operating system provides an interface to user to interact with the computers hardware .

Why OS ?

To write directly machine level language is really difficult for any programmer , since in early 60s people use to write machine level language directly . Now we have OS to avoid writing those MLL instead we use OS interface to interact with hardware .

Some OS are convenient and some are efficient and some are…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store