Skip to content

ErhanArda/metrobi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Questions

  1. Write a function that finds the duplicate items in any given array.

  2. Write an async python function that writes every item in any given array with 1, 2, 4, 8, ... seconds apart. ex: for [“a”,” b, “c, “d”], “a” is printed in 1 sec, “b” is printed in 2 seconds, “c” is printed in 4 seconds, ...

  3. Write the necessary html-css code for generating the below figure (using flex).

  4. Write an efficient method that tells us whether or not an input string brackets ("{", "}", "(", ")", "[", "]") opened and closed properly. Example: “{[]}” => true, “{(])}” => false, “{([)]}” => false

  5. A building has 100 floors. One of the floors is the highest floor an egg can be dropped from without breaking. If an egg is dropped from above that floor, it will break. If it is dropped from that floor or below, it will be completely undamaged and you can drop the

egg again. Given two eggs, find the highest floor an egg can be dropped from without breaking, with as few drops as possible on the worst-case scenario. 6) Write the code that animates “Zeno's Paradox of Achilles and the Tortoise” on an interface(terminal for python)(we would like to see the paradox demonstrated). 7) Think that you have an unlimited number of carrots, but limited number of carrot types. Also, you have one bag that can hold a limited weight. Each type of carrot has a weight and a price. Write a function that takes carrotTypes and capacity and return the maximum value the bag can hold. Example: carrotTypes = [{kg: 5, price: 100}, {kg: 7, price: 150}, {kg: 3, price: 70}] capacity = 36 //kg getMaxValue(carrotTypes, capacity)