Skip to content

Common Algorithms you can use them to prepare your self to interview start with easy to difficult ones

Notifications You must be signed in to change notification settings

MohamedFawzy/AlgorithmsForInterview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Common Algorithms you can use them to prepare your self to interview start with easy to difficult ones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages