Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.54 KB

File metadata and controls

32 lines (22 loc) · 1.54 KB

Build Status

Solves problems from "Elements of Programming Interview" in Java (Adnan Aziz et all)

  • Merge Sorted Lists
  • Reverse LinkedList (iteratively)
  • Reverse sublist
  • Segregate even and odd nodes in a LinkedList (!EPI)
  • Detect Overlapping Lists
  • You are given two linked-lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. (Microsoft)
  • Write a function to delete Kth node from behind in a single linked list

Dynamic Programming

  • Write a function that takes in an array of positive integers and returns an integer representing the maximum sum of non-adjacent elements in the array. If a sum cannot be generated, the function should return 0 (!EPI).

  • Given an array of positive integers representing coin denominations and a single non-negative integer representing a target amount of money, implement a function that returns the number of ways to make change for that target amount using the given coin denominations. Note that an unlimited amount of coind is at your disposal.

  • Solve Levenshtein distance problem.

Tree

  • Solve a descendant tree to find the Youngest Common Ancestor given the root node, and two descendant nodes.

Recursion

  • Write a function to generate all permutations of a given array of elements
  • Write a function to generate Powerset of a given set. Two solutions: iterative and recursive