Open in app

Sign In

Write

Sign In

Maor Rocky
Maor Rocky

9 Followers

Home

About

Oct 16, 2020

The 10 most important DP questions

Let's solve them, here is the list. Longest Common Subsequence Shortest Common Supersequence Longest Increasing Subsequence problem The Levenshtein distance (Edit distance) problem Matrix Chain Multiplication 0–1 Knapsack problem Partition problem Rod Cutting Coin change problem Word Break Problem Top 10 Dynamic programming problems Dynamic programming is a method for solving a complex problem by breaking it down into a collection of simpler…medium.com

1 min read

1 min read

The 10 most important DP questions

Let's solve them, here is the list.

  1. Longest Common Subsequence
  2. Shortest Common Supersequence
  3. Longest Increasing Subsequence problem
  4. The Levenshtein distance (Edit distance) problem
  5. Matrix Chain Multiplication
  6. 0–1 Knapsack problem
  7. Partition problem
  8. Rod Cutting
  9. Coin change problem
  10. Word Break Problem

Top 10 Dynamic programming problems

Dynamic programming is a method for solving a complex problem by breaking it down into a collection of simpler…

medium.com

  1. LONGEST COMMON SUBSEQUENCE

Understanding the question:
for each letter, we will check…

--

--


Oct 16, 2020

Sorting LinkedList in JAVA

How can you sort a LinkedList in O(n*logn) running time and less than O(n) space? Use merge sort. we will start with 2 subproblems and then combine it all for a valid solution. Firstly, merge two sorted list: If one of the lists is null then return the other one, else create…

Linkedlist

3 min read

Linkedlist

3 min read


Oct 15, 2020

Serialization in JAVA

So what exactly is serialization? Serialization is a mechanism of converting the state of an object into a byte stream. Deserialization is the reverse process where the byte stream is used to recreate the actual Java object in memory. This mechanism is used to persist the object. …

Serialization

2 min read

Serialization

2 min read


Oct 15, 2020

Singleton in JAVA

First the code public class SingletonDemo { private static SingletonDemo singleton = null; private SingletonDemo() { System.out.println("singleton created"); } public static SingletonDemo getInstance() { if (singleton == null) { singleton = new SingletonDemo(); } return singleton; } } The code above is an example of a lazy singleton.

Java

1 min read

Java

1 min read


Oct 15, 2020

Sorting in O(n)

Counting sort Counting sort is base on the assumption that the array contains only integers, and they are between 0 to k, where k is known!. …

Sorting

3 min read

Sorting

3 min read


Oct 15, 2020

SORTING using MergeSore and QuickSort

A quick word about sorting using comparisons, each array with n items has n! permutations, if we look at the algorithm as a binary tree that each node to leaf is a premutation then the are n! …

Sorting

2 min read

Sorting

2 min read

Maor Rocky

Maor Rocky

9 Followers

Hi i'm Maor

Following
  • Erik Engheim

    Erik Engheim

  • Sunny Beatteay

    Sunny Beatteay

  • Mehmet Ozkaya

    Mehmet Ozkaya

  • Entreprogrammer

    Entreprogrammer

  • Ryan Holiday

    Ryan Holiday

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech