The Eisenhower matrix.

The Eisenhower matrix.

ยท

3 min read

You cannot make progress without making decisions.

Overview

We have to make decisions each and every day of our lives. Sometimes we might get stuck endlessly thinking about what action to take. Say working on n number of tasks and not sure which one to prioritise and we end up doing half-baked work (we all must have been in this scenario once in a while).

The below matrix helps us to make careful decisions and also to learn the relationship between important and urgent.

We should evaluate the tasks that are given to us and try to maximise our potential with the matrix framework.

Why and how this framework might be handy? Let's take a quick example by applying this matrix. Let's say I'm a youtube content creator.

  1. If I have to make video content tomorrow, I should be doing it right away since it is more important and urgent. (DO NOW)

  2. We need to edit the video after we are done with the shooting work. Since it is urgent, we can delegate those works and we can purely focus on video creation. (DELEGATE)

  3. Since we have delegated some parts (editing, fine-tuning) of the content creation, we can look for ideas ๐Ÿ’ก for the next video. (DECIDE)

  4. If there are some other works which are neither important nor urgent, we can ignore those. (DELETE)

References

The below video clearly explains how to apply the Eisenhower matrix in our life.

Bonus content

Question 6:

Explanation:

  1. Have 2 references to the head pointer. (head1 and head2)

    1. Move one pointer (head2) to n number of steps.

    2. Move another pointer (head1) along with the current pointer till the current becomes null.

  2. Check if the pointer is the same as the head node.

    1. If so, handle it by deleting the head pointer to the next.

    2. If not, just ignore the node to delete it by keeping the previous reference and pointing it to the current node's next.

Solution:

/**
 * Definition for singly-linked list.
 * public class ListNode {
 *     int val;
 *     ListNode next;
 *     ListNode() {}
 *     ListNode(int val) { this.val = val; }
 *     ListNode(int val, ListNode next) { this.val = val; this.next = next; }
 * }
 */
class Solution {
    public ListNode removeNthFromEnd(ListNode head, int n) {
        ListNode prev = null, head1 = head, head2 = head;

        // Move one pointer to the given 'n' count.
        for (int i=0; i<n; i++) {
            head2 = head2.next;
        }

        // Move both the pointers till the 2nd pointer becomes null.
        while (head2!= null) {
            prev = head1;
            head1 = head1.next;
            head2 = head2.next;
        }

        // If the node we need to delete is the head, we just handle it by returning the next node as head.
        if (head1 == head) {
            return head1.next;
        }

        // Remove the node with the help of previous node reference.
        prev.next = head1.next;
        return head;
    }
}

Next problem:

In the next post, I will cover the below problem.

Did you find this article valuable?

Support Karthick Ramjee's Blog by becoming a sponsor. Any amount is appreciated!

ย