Coder Social home page Coder Social logo

cruxrebels / interviewbit Goto Github PK

View Code? Open in Web Editor NEW
263.0 6.0 165.0 292 KB

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 through practical learning and mentorship.

License: MIT License

C++ 96.50% Java 3.50%
arrays backtracking binarysearch dynamic-programming bit-manipulation greedy-algorithms hashing heaps maps linked-list math stack queue string-manipulation trees two-pointers cplusplus-14 cplusplus-11 interviewbit-solutions interviewbit

interviewbit's Introduction

InterviewBit

This repository is a collection of my gists (working βœ… code snippets passing all test cases on the InterviewBit online judge) solutions in the absolutely fantastic language, C++.

Edit: I've lately moved to Java hence trying to re-solve all the problems slowly and adding my Java solutions to this repo as well!

Hence, the solutions won't directly execute on your local IDE or compiler, the main() would need to be written and the solution's function would need to be invoked with appropriate inputs/test cases to run in standalone.

Notes:

  • Sometimes, multiple solutions/approaches have been provided with relevant comments in the solution file, these are being continuously updated as and when I find a more optimized solution. Be wary of copying two solutions separated by comments simultaneously to run/submit on InterviewBit's online judge. Both shall work individually.
  • I've used C++11 (list initialization, auto, emplace_back, etc) features in each and every solution.
  • The solutions also succinctly encompasses years of C++ industry programming experience and care has been taken to optimize even at the slightest visible portions of the code.
  • The code in this repo is completely original content and written by me. If you like what you see, don't forget to show your liking by ⭐ing this repo.

How to contribute?

  1. Fork the repository 🍴
  2. Do the desired changes (add/delete/modify) ✏️
  3. Make sure you've followed the existing coding standards and pattern of pasting the entire problem statement with a link to the problem on InterviewBit. For reference, you can follow any existing file in this Repo. e.g. AddOneToNumber.cpp
  4. Attach a screenshot from InterviewBit showing that your solution was ACCEPTED by the online judge. I've been getting a lot of pull requests which are not Accepted by the online judge.
  5. Make a pull request :shipit:

When should you contribute?

  • If your solution's time complexity ⏰ is better than the solution already present or,
  • If your solution's space complexity πŸ’Ύ is better than the solution already present or,
  • If your solution is of the same time and space complexity but is more concise πŸ“ƒ. In this case, comment out the original solution & make a pull request with your solution or,
  • If your solution is of the same time and space complexity but is easier/more readable πŸ“„ to understand or,
  • If you use the same solution as present in the main branch and have gone the extra mile to add short comments πŸ“ explaining what's happening or what's the rationale at that particular code line, wherever necessary. πŸ™

interviewbit's People

Contributors

abhiagx avatar devesh511 avatar nishthapaul avatar bharatnischal avatar shivanshu-0 avatar shubham-lather avatar

Stargazers

 avatar  avatar  avatar Pratyaksha Newalkar avatar Jasmer Singh Sanjotra avatar Ayush Kumar Awasthi avatar Ronak Haresh Chhatbar avatar MOHD FARHAN avatar Vladimir Kuklin avatar Deepshikha Dutta avatar Karthikeyan M avatar Richard Qian avatar R S avatar Casper avatar  avatar Erik Nelsestuen avatar Govind purty avatar  avatar AbdulHadi  avatar S. M. Anwarul Islam (Raju) avatar Abhinandan B M avatar Raj Jada avatar Aditya Lahane avatar Dhruva Agrawal avatar Pranay Pandey avatar Pushkar Nitin Waykole avatar Sugata Sarkar avatar  avatar ANKIT GURWAN avatar Osta avatar Ayush Varma avatar Rakibur Rahman avatar kara avatar Kunal Yadav avatar VenkatSairam avatar Annsh Agrawaal avatar Jyotishman Kashyap avatar iamsaurabhjadhav avatar Md. Tauseef - Ur - Rahman avatar SaiVarshith V avatar Vikas Khambra avatar Utkarsh Aditya avatar Nishant-B avatar M Sanjay Sharma avatar Subhashis Bhowmik avatar Justin Etu avatar Likith Sai avatar  avatar Abhay Sharma avatar  avatar Nikhil Sekaran avatar Aleksandr Simonov avatar jasr avatar Saksham Arora avatar  avatar Manthan Ankolekar avatar  avatar  avatar Yatharth Nigam avatar Snehel avatar Yogesh Sonar avatar Harsh Singh avatar Sujay Kundu avatar  avatar Ashutosh Anand avatar  avatar Mohit Singh avatar Nishtha Rathod avatar  avatar Vijay Kiran avatar Bitan Sarkar avatar Soumik Pal avatar  avatar Rishu Tiwari avatar  avatar  avatar Akshay Malviya avatar Prachi Hiware avatar Harshit Chauhan avatar Pushpendra Vishwakarma avatar  avatar Guntuboina Sankirtana avatar  avatar  avatar Bhagya Vinod Rana  avatar bagher sohrabi avatar BP avatar Aryan Blouria avatar Rohit Mishra avatar Swetha Saseendran avatar Harshit Rathi avatar Anant Singh avatar Sourabh Mittal avatar Ajay Biswas avatar Thanaphoom Babparn avatar Raviteja Daggupati avatar  avatar UBAID AHMED avatar Priyanka Perinbam avatar Gaurav Dotiya avatar

Watchers

hurricane avatar  avatar Omer Demir avatar  avatar DEVANG SHARMA avatar  avatar

interviewbit's Issues

Time Out

Hey according to your code nextRight(B) calling same node again which definitely gives wrong ans You should replace it with nextRight(B->next).

getting interviewbit solutions

Hi, can you tell me how you downloaded your solutions from Interviewbit? Did you scrape the website or use any automated method to get your solutions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.