mohamedfawzy / algorithmsforinterview Goto Github PK
View Code? Open in Web Editor NEWCommon Algorithms you can use them to prepare your self to interview start with easy to difficult ones
Common Algorithms you can use them to prepare your self to interview start with easy to difficult ones
Problem 1 (Other ) : Evaluate the value of an arithmetic expression in Reverse Polish Notation . Valid operators a re + , −, ∗ , /. Each operand may be an integer or another expression . Some examples : [ " 2 " , " 1 " , "+ " , " 3 " , " ∗ " ] −> ( ( 2 + 1) ∗ 3) −> 9 [ " 4 " , " 13 " , " 5 " , "/ " , "+ " ] −> (4 + (1 3 / 5) ) −> 6 Problem 2 (Search - Binary Search) : * Implement a fast Integer square root Function takes * in a 32-bit unsigned Integer and returns another 32-bit unsigned integer * that is the floor of the square root of the input Problem 3(Search - Binary Search) : Write a method that takes a sorted array A of integers and a key k md return the index of first occurrence of k h A return -l if k does not appear in A. Write tests to verify your code. Problem 4(Search - Binary Search): * Design an efficient algorithm that finds the next index of first occurrence an element * larger than specified key k, return -1 if every element is less than or equal to k Problem 5(Other): * write efficient algorithm that return fibonacci sequence Problem 5(Search - Binary Search) * suppose you do not know the length of array a in advance , accessing a[i] for i * beyond the end of the array throws an exception * find the index of the first occurrence in a specified key k , return -1 if * k does not appear in a Problem 6(Search - Binary Search) * Given a sorted array a,b of length m,n find intersections between two arrays Problem 7(Search - Hashing) # Given a dictionary of of english words, return the set of all words grouped into subsets of words that are # all anagrams for each other Problem 8(Search - Hashing) Design m efficient algorithm for determining if there exist a pair of indices (not necessarily distinct) such that a[i]+a[j]=8 Problem 9 (Search) Given a robot with the energy regeneration ability described above, the mass of the robot m and a sequence of three dimensional co-ordinates that the robot needs to traverse, how would you determine the minimum battery capacity needed for the robot to complete the trajectory? (Assume the robot starts with a ull charged battery and the battery is used only for overcoming gravity)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.