Speed Training Myself Till I Get Placed

Speed Training Myself Till I Get Placed

Every day starting today, I’ll write a few articles and append them here.

I’ll be giving mocks every day.

These will be timed mocks of previous year OA questions, CP questions, SQL questions, Aptitude questions, and machine coding questions.

I’ll dedicate 3 hours daily to this grind.

Why am I doing this?

Well, cause I have messed up 4 OAs and before I give my 5th one I want to be so prepared that it feels like brushing my teeths.

And how will this be useful to you?

If you are lost about what to practice, don’t much just get on.

This will be my very first series where I won’t be focused on writing great.

Just consistency improvements and techniques.

Whenever I get placed use it as a guide to follow, for it has practically everything you might need.

And to ensure I am up to the mark for interviews, I’ll record videos too.

Right now, they’ll be private.

What can you expect:

  1. 4 previous year OA questions [I’ll name companies too]
  2. 4 CP-31 sheet questions [Cause I have completed DSA]
  3. 30 mins of SQL Speedrun Practice
  4. 30 mins of Aptitude

Will later add machine coding, maybe, but right now this is the plan.

See you every day with the results of my efforts.

Today is 19th July 2026.

Let’s see when I get placed and with what package.

For now, singing off. Stay Tuned and bookmark these for further articles…

I’ll start adding as planned from tomorrow but wanted to add atleast something tonight:

Question: https://codeforces.com/problemset/problem/1853/A

I tried this for 15 mins with trying to explain my approach but couldn’t solve.

My Attempt
#include <iostream>
#include<vector>
#include<climits>
// #include <bits/stdc++.h>
using namespace std;
bool isSorted(vector<long long> &arr) {
    for(int i = 1; i < arr.size(); i++) {
        if(arr[i]<arr[i-1]) {
            return false;
        }
    }
    return true;
}
int main()
{
    int t;
    cin>>t;
    while(t--) {
        int n;
        cin>>n;
        vector<long long> arr(n);
        for(int i = 0; i <n;i++) {
            cin>>arr[i];
        }
        if(!isSorted(arr)){
            cout<<0<<endl;
        } else {
            long long mind = LONG_MAX;
            for(int i = 1; i < n; i++) {
                long long diff = arr[i]-arr[i-1];
                mind = min(mind, diff);
            }
            if(mind==0)mind = 1;
            cout<<mind<<endl;
        }
    }

    return 0;
}

The correct answer was:

cout<<(mind/2)+1<<endl;

Yup. Only this much. To be precise, each operation changes the diff by 2 points, so overall I’ll need the minimum difference by 2 + 1 number of operations to turn a sorted array into an unsorted one.

On an honest note, I couldn’t have figured it out on my own. But I’ll keep this as a lesson learned.

Good night.

[After Day 1 New Plan: SQL and Apti stay. I’ll solve at least 1 CP question, and for now I’ll not pick really hard OA questions.]

  1. https://python-hub.com/day-1-plan-needs-some-changes-after-todays-attempt/

Leave a Reply