Pages

Sunday, April 26, 2026

NEW TO TECH WORLD: natural progression path: when to choose backend, sre, platform engieering? clear all your buzzwords doubts here!


🤔 Feeling Confused? Good.

That’s normal.

The tech world throws around a lot of buzzwords. So instead of thinking:

“Which role should I pick forever?”

Think of it like this:

👉 You’re not choosing a floor in a building
👉 You’re choosing a position on a sports team


🧭 Step 1: Understand the Journey (Not the Label)

You don’t lock yourself into one role for life.

Instead, you evolve.

🚀 The Real “Elite” Path Looks Like This:

🔰 Entry Level (Years 1–2):
➡️ Backend Engineer

  • You learn Java, Spring Boot
  • You build real features
  • You understand how apps actually work

🧠 Mid-Level (Years 3–5): Choose Your Direction

Ask yourself:

👉 Do I enjoy building systems/tools for others?
➡️ Go Platform Engineering (“I build the road”)

👉 Do I enjoy fixing problems and debugging systems?
➡️ Go SRE (“I fix the race car”)

👉 Do I enjoy designing and improving core logic?
➡️ Go Senior Backend (“I design the engine”)


🎮 Step 2: Pick Your “Vibe”

Instead of titles, ask:

“What kind of work feels fun to me?”

RoleWhat You Actually DoYour Vibe
Backend Engineer“I’m coding a Like button.”🎨 Creator
SRE“The Like button is slow. I fix it.”🧩 Problem Solver (Doctor)
Platform Engineer“I build tools so others can create Like buttons easily.”🏗️ Architect

⚠️ Step 3: Important Reality Check

Trying to become SRE or Platform Engineer on Day 1?

❌ Bad idea.
You’ll get overwhelmed.


✅ The Smart Strategy: “Backend First”

Why Backend?

👉 Easier to get jobs

  • Most fresher roles = SDE (Backend/Fullstack)

👉 Builds coding strength

  • You can’t manage systems if you can’t build them

👉 Keeps doors open

  • Backend ➝ Platform ✅ easy
  • SRE ➝ Backend ❌ harder

🗺️ Step 4: Your 4.5-Year Game Plan

🎓 Step 1: BCA (Now → 1.5 Years Left)

👉 Focus: Backend Mastery

  • Learn: Java + Spring Boot
  • Practice: 200+ LeetCode problems

🔥 Main Target: Crack NIMCET

This is your biggest “career security” move


🎓 Step 2: MCA (Next 2 Years)

👉 Focus: Bridge to DevOps

  • Learn: Docker, Kubernetes
  • Learn: Cloud (AWS/GCP)

💡 Result:
You become:

Backend Developer + Infrastructure Knowledge = 🔥 Valuable


💼 Step 3: First Job (After 4.5 Years)

👉 Apply for:

  • Software Engineer
  • SDE-1 roles

👉 Once inside:

  • Observe Platform & SRE teams
  • If you like it → switch internally in ~1 year

🧠 Step 5: What Should You Do RIGHT NOW?

Stop this thought:

“SRE or Platform???”

That’s like asking:

“Heart surgeon or brain surgeon?”
…before learning basic biology.


🎯 Your ONLY job right now:

👉 Master Java + Backend

And while coding, always ask:

💡 “What if 1 million users use this?”

That one question = 🚪 Gateway to elite engineering


⚔️ Final Mindset

  • Java = 🗡️ Your sword
  • Backend = 🎯 Your first quest
  • SRE & Platform = 🐉 Boss levels

You don’t skip to boss fights.
You level up first.


👀 Now your turn:

Which one feels unclear?

👉 The roadmap?
👉 Backend vs SRE vs Platform?
👉 Or how to actually start learning?

Tell me, and I’ll break that part down even simpler.

Wednesday, March 18, 2026

3Sum - Leetcode solution - How i turned into two-pointer approach?

 class Solution {

    public List<List<Integer>> threeSum(int[] nums) {
        Arrays.sort(nums); // first sort -> helps to turn into 2pointer
        List<List<Integer>> res = new ArrayList<>();

        for(int i=0; i<nums.length-2; i++) {
           
            // skip duplicates
            if(i > 0 && nums[i] == nums[i-1]) continue;

            int left = i+1;
            int right = nums.length-1;

            while(left < right) {

                int sum = nums[i] + nums[left] + nums[right];

                if(sum == 0) {
                    // add
                    res.add(Arrays.asList(nums[i], nums[left], nums[right]));

                    // skip duplicates
                    while(left < right && nums[left] == nums[left+1]) left++;
                    while(left < right && nums[right] == nums[right-1]) right--;
                    left++; right--;

                }
                // move pointers
                else if(sum < 0){
                     left++;
                     }
                else {
                    right--;
                    }
            }

        }

        return res;


       
    }
}

167. Two Sum II - Input Array Is Sorted

1. TWO POINTER APPROACH


 class Solution {

    public int[] twoSum(int[] numbers, int target) {
        // 1. two pointer approach - initialize the var.
        int left = 0;
        int right = numbers.length-1;

        // 2. while loop until pointers meet
        while(left < right) {
            int currentSum = numbers[left]+numbers[right];

            // 3. check the sum
            if(currentSum == target) {
                return new int[] {left+1, right+1}; // why we did this, Q. asked 1-indexed array, so we add +1 in our 0-idxed array
            } if(currentSum < target) {
                left++;
            } else {
                right--;
            }
        }
        return new int[] {-1, -1}; // -1 cuz exactly 1 solution
    }

   
}


2.


1. TWO POIN1. TWO POINTER APPROACHTER APPROACH

Friday, March 13, 2026

Next Greater element 1 - monotonic stack problem - LEETCODE 496

class Solution {
    public int[] nextGreaterElement(int[] nums1, int[] nums2) {
        HashMap<Integer, Integer> map = new HashMap();
        Deque<Integer> stack = new ArrayDeque<>(); // faster than stack

        for(int num : nums2) { // scans each no. in nums2
           
            while(!stack.isEmpty() && stack.peek() < num) {
                map.put(stack.pop(), num);
            }
            stack.push(num);
           
        }

        int[] result = new int[nums1.length]; // num1 jitna length ka answer hona chaiye!
       
        for(int i=0; i<nums1.length; i++) {
            result[i] = map.getOrDefault(nums1[i], -1); // if it exists, return value nums1[i] else return -1
        }

        return result;
       
           
        }
    }

Wednesday, February 18, 2026

Encode and Decode Strings - NeetCode.IO Solution by me + gemini pro 3.0 explained

 class Solution {

        // encode: List of Strings -> String
    public String encode(List<String> strs) {
        StringBuilder sb = new StringBuilder();

        for(String str : strs) {
            // Pattern: Length + Delimiter # + String
            sb.append(str.length()).append("#").append(str);
        }


        return sb.toString(); // return in String
    }


        // decode: String -> List of Strings
    public List<String> decode(String str) {
        List<String> res = new ArrayList<>(); // store res
        int i = 0; // var. for loop

        while(i < str.length()) {
            // 1. find delimitter to get length prefix
            int slash = str.indexOf('#', i);

            // 2. parse the length from characters between i and slash
            int length = Integer.parseInt(str.substring(i, slash));

            // 3. store extractedStr
            String extString = str.substring(slash + 1, slash + 1 + length);
            res.add(extString);

            // 4. move the pointer 'i' to the start of next encoded_String
            i = slash + 1 + length;
        }

        return res;
    }
}

Tuesday, February 10, 2026

activity selection - asked in facebook, ms , flipkart. + explaination

import java.util.*;



public class Main

{

public static void main(String[] args) { // O(n)

int start[] = {1, 3, 0, 5, 8, 5};

int end[] = {2, 4, 6, 7, 9, 9};

// end time basis sorted

int maxAct = 0;

ArrayList<Integer> ans = new ArrayList<>();

//sorting 

int activities[][] = new int[start.length][3];

for(int i=0; i<start.length; i++) {

    activities[i][0] = i;

    activities[i][1] = start[i];

    activities[i][2] = end[i];

}

// lambda function -> shortform

Arrays.sort(activities, Comparator.comparingDouble(o -> o[2]));

// 1st activity

maxAct = 1;

ans.add(activities[0][0]);

int lastEnd = activities[0][2];

for(int i=1; i<end.length; i++) {

    if(activities[i][1] >= lastEnd) {

        // activity select

        maxAct++;

        ans.add(activities[i][0]);

        lastEnd = activities[i][2];

    }

}

System.out.println("max activities = " + maxAct);

for(int i=0; i<ans.size(); i++) {

    System.out.print("A"+ans.get(i) + " ");

    

}

System.out.println();

}

}



EXPLAINATION:

This code is a classic implementation of the Activity Selection Problem using a "Greedy Algorithm" approach.

The Goal

Imagine you have a single meeting room and a list of requested meetings (activities), each with a start time and an end time. You want to select the maximum number of meetings possible without any of them overlapping.

The logic used here is: "Always pick the next activity that finishes the earliest."


Step-by-Step Explanation

1. The Input Data

Java
int start[] = {1, 3, 0, 5, 8, 5};
int end[] =   {2, 4, 6, 7, 9, 9};

These arrays represent 6 different activities. For example:

  • Activity 0 starts at 1 and ends at 2.

  • Activity 2 starts at 0 and ends at 6.

2. Preparing the Data Structure

The code creates a 2D array called activities to keep the data organized. This is necessary because we are about to sort the activities, and we don't want to lose track of which start time belongs to which original index.

Java
int activities[][] = new int[start.length][3];
// ... loop filling the array ...

The activities array stores data in 3 columns:

  • Column 0: The original index (ID of the activity: 0, 1, 2...).

  • Column 1: The Start time.

  • Column 2: The End time.

3. Sorting ( The Crucial Step)

Java
Arrays.sort(activities, Comparator.comparingDouble(o -> o[2]));

This sorts the activities based on Column 2 (End Time).

  • Why? By picking activities that finish early, you leave more time remaining for other activities. This is the "Greedy" part.

  • The Lambda: o -> o[2] is a shortcut saying "Compare the rows based on the value at index 2."

After sorting, your list looks like this:

Original Index (ID)StartEndStatus
A012Finishes earliest
A134
A206
A357
A489
A559

4. The Selection Loop

Now, the code iterates through the sorted list to pick activities.

A. Pick the first one:

Java
maxAct = 1;
ans.add(activities[0][0]); 
int lastEnd = activities[0][2];

The first activity in the sorted list (A0) finishes earliest, so we always pick it.

  • Current End Time (lastEnd): 2

B. Check the rest:

The loop checks every subsequent activity. The condition if(activities[i][1] >= lastEnd) checks: Does this activity start after the previous one finished?

  1. Check A1 (3, 4):

    • Does it start (3) after the lastEnd (2)? Yes.

    • Action: Select it. Update lastEnd to 4.

  2. Check A2 (0, 6):

    • Does it start (0) after the lastEnd (4)? No. (Overlap!)

    • Action: Skip it.

  3. Check A3 (5, 7):

    • Does it start (5) after the lastEnd (4)? Yes.

    • Action: Select it. Update lastEnd to 7.

  4. Check A4 (8, 9):

    • Does it start (8) after the lastEnd (7)? Yes.

    • Action: Select it. Update lastEnd to 9.

  5. Check A5 (5, 9):

    • Does it start (5) after the lastEnd (9)? No.

    • Action: Skip it.


Complexity Note

The comment in your code // O(n) is technically incorrect for the whole program.

  • Sorting takes $O(N \log N)$.

  • The Loop takes $O(N)$.

  • Total Time Complexity: $O(N \log N)$ (dominated by the sort).

Final Output

The code will print:

Plaintext
max activities = 4
A0 A1 A3 A4 

Would you like me to explain how the Lambda function syntax works in more detail, or help you convert this to a custom Class instead of a 2D array?


NEW TO TECH WORLD: natural progression path: when to choose backend, sre, platform engieering? clear all your buzzwords doubts here!

🤔 Feeling Confused? Good. That’s normal. The tech world throws around a lot of buzzwords. So instead of thinking: “Which role should I...