malltshik / useyourbrain-tasks

This is repo for storing most interestion interview questions and tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The most interesting interview tasks & questions

List:

  • Product of all the numbers except the one at i (Uber interview task)
Given an array of integers, return a new array such that each element at index i of the new array
is the product of all the numbers in the original array except the one at i.
 
For example, if our input was [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24].
If our input was [3, 2, 1], the expected output would be [2, 3, 6].
 
Follow-up: what if you can't use division?
  • Is up to K (from dailycodingproblem.com)
This problem was recently asked by Google.
Given a list of numbers and a number k, return whether any two numbers from the list add up to k.
For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17.
Bonus: Can you do this in one pass?
  • RepeatableCharacter
In this task you have to find a first letter which has 
a duplicate ones in source string
For instance:
"ABCDEAFG" -> "A"
"ABCDEBFG" -> "B"
"LBCBADGC" -> "B"
"ABCDEFG" -> null
  • StairsToTheTop
In this task you have a N stairs and set of allowed step's sizes

For instance:
Given N = 2, S = {1,2}
You have to decide how many paths you might to use to going from bottom to top
In that example return value will be 2, because you could finish starts by one step from bottom to top
and by two steps from 0 to 1 stair and next step would be from 1 to 2 stair
  • HopTowers
In this task you get an array of tower where each element means high of tower
High of tower at the same time means how many steps you allow to do
For instance:
Given [1,2,0,3]
From index 0 at the first tower which high is 1 you allow to do only one step
From index 1 at the second tower which high is 2 you allow to do 2 steps or less (to third or fourth tower)
Therefore you need return true if towers in possible to hopped over the end and false at the other way

-FSTask

File system tree build task.
Output result kind of: 
└── /
    ├── usr
    │   └── local
    │       ├── bin
    │       │   └── my.conf
    │       └── share
    │           └── apache
    │               └── vhost.conf
    ├── tmp
    │   └── trash
    │       └── remove_me.txt
    └── home
        ├── charley
        │   └── tasks.txt
        └── john
            ├── Node.java
            └── FSTask.java
  • 2048 Game
Everybody knows this game. You could run main method in Game class and play ;)
  • Kalah Game
In progress. 

About

This is repo for storing most interestion interview questions and tasks


Languages

Language:Java 100.0%