Skip to content

soheshdoshi/InteviewTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InteviewTask

  • Implement LRU cache for integer only values.The cache should have accessing complexity of O(1).Cache should be of fixed size and upon getting full, least recently used items should be removed.Most recently used values must be at the top of cache.
  • Create a tree of integer values, depth of the tree must be taken in input Values of the tree nodes must be autogenerated and must range from 1 to 100 Take an input number, call it sum Check if in a tree there is any hierarchy starting from root and traversing to childs, such that the summation of its values is equal to the input such that the summation of its values is equal to the input, for eg if the depth is 3 and traversing from root to any child node results in sum, print the traversal Print such hierarchies.
  • Create a 2d matrix of variable size call it main matrix Take the input of a smaller 2D matrix, smaller than the main matrix Check if the smaller matrix is a subset of the main matrix.

Releases

No releases published

Packages

No packages published

Languages