Giter Site home page Giter Site logo

realanupreet / 6companies30days Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 11.8 MB

This repository contains my solutions to practice technical interview questions from top tech companies. I am using this challenge as an opportunity to improve my skills and work towards achieving my goals.

License: MIT License

Python 91.16% Nix 0.02% PowerShell 0.42% Shell 0.18% Cython 5.88% C++ 2.33%
coding interview interview-preparation interview-practice interviewprep revisewitharsh 6companies30days 6companies30days2k23

6companies30days's Introduction

6Companies30Days

This repository contains my solutions to practice technical interview questions from top tech companies. I am using this challenge as an opportunity to improve my skills and work towards achieving my goals.

Question Notes
Evaluate Reverse Polish Notation it was a relatively easy question once you know the pattern behind it. it follows the classic stack pattern; appending the element till you find a operator. Once you find an operator, you have to pop the last two elements from the stack and perform the operation on the elements. Then add the result back to the stack. After you're done traversing, the first (0th) element of the stack would be the answer
Combination sum III so, yeah its basically a backtracking problem with you to find out your bounding function, pretty nuts right, lets digest its nutty behaviour. gym bros youll get a lot of protein with it.๐Ÿ‘€ So, under the hood it uses up some smart recursion, what i does is, it tries to traverse up each and every combination but smartly, i.e if it finds if its going out of nowhere, exceeding the limit of "k" elements or the target not reaching even if we have "k" elements then it backs off considering the path as beaten up. thats what we see in the base case of our recursive backtrack function. before the for loop. Well, so now we know when it needs to stop, lets go through what it does to actually have a walk, when we have the first element of the combination figured out with the num variable, it goes ahead and adds it to the temporary combination list and minuses the target (we want the target to be 0 eventually). we do this every time, i.e everytime we add a new element to our combination list. tho we keep in mind that we are only adding the element which is less, than our target, if we add it anyway, we end up increasing the sum and putting the target below, thats not helping and we dont want that. when we get a combination with the required "k" elements when we have our target 0, we add it to the result list and continue our search for more such combinations

6companies30days's People

Contributors

realanupreet avatar

Watchers

 avatar

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.