Skip to content
View abhiagx's full-sized avatar

Block or report abhiagx

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
abhiagx/README.md

Hello, I’m Abhi! 👋 Welcome to my GitHub! Let's build the future together! 🚀

stats graph languages graph

python logo aws logo java logo markdown logo c logo cplusplus logo wordpress logo dot-net logo csharp logo

LinkedIn Wordpress


pacman contribution graph

Pinned Loading

  1. InterviewBit InterviewBit Public

    A collection of Abhishek Agrawal's C++ solutions providing scalable, production-quality code to 200+ LeetCode-style problems on https://www.interviewbit.com, designed to enhance algorithmic skills …

    C++ 266 165

  2. You are in an infinite 2D grid where... You are in an infinite 2D grid where you can move in any of the 8 directions : (x,y) to (x+1, y), (x - 1, y), (x, y+1), (x, y-1), (x-1, y-1), (x+1,y+1), (x-1,y+1), (x+1,y-1) You are given a sequence of points and the order in which you need to cover the points. Give the minimum number of steps in which you can achieve it. You start from the first point. Example : Input : [(0, 0), (1, 1), (1, 2)] Output : 2 It takes 1 step to move from (0, 0) to (1, 1). It takes one more step to move from (1, 1) to (1, 2). This question is intentionally left slightly vague. Clarify the question by trying out a few cases in the “See Expected Output” section. Tags: InterviewBit Arrays Problem https://www.interviewbit.com/problems/min-steps-in-infinite-grid/
    1
    /*
    2
    You are in an infinite 2D grid where you can move in any of the 8 directions :   
    3
    (x,y) to (x+1, y), (x - 1, y), (x, y+1), (x, y-1),      (x-1, y-1),      (x+1,y+1),      (x-1,y+1),      (x+1,y-1)  
    4
    You are given a sequence of points and the order in which you need to cover the points. 
    5
    Give the minimum number of steps in which you can achieve it. You start from the first point.  
  3. Given a positive integer which fits ... Given a positive integer which fits in a 32 bit signed integer, find if it can be expressed as A^P where P > 1 and A > 0. A and P both should be integers. Example Input : 4 Output : True as 2^2 = 4. Tags: InterviewBit Math Problem https://www.interviewbit.com/problems/power-of-two-integers/
    1
    bool Solution::isPower(int A) {
    2
        if (A<2)
    3
            return true;
    4
      
    5
        for (auto i = 2; i<=sqrt(A); ++i)
  4. Given a matrix of m * n elements (m ... Given a matrix of m * n elements (m rows, n columns), return all elements of the matrix in spiral order. Example: Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] You should return [1, 2, 3, 6, 9, 8, 7, 4, 5]. Tags: InterviewBit - Arrays topic (https://www.interviewbit.com/problems/spiral-order-matrix-i/).
    1
    vector<int> Solution::spiralOrder(const vector<vector<int> > &A) {
    2
    	vector<int> result;
    3
    	// DO STUFF HERE AND POPULATE result
    4
    	auto rows = A.size();
    5
    	if (rows == 0)