- frequency-counting, Google, Hash, Mathematical, Strings

Minimum time required to complete all tasks without altering their order

  import java.util.*;  class GFG {                  static void findMinimumTime(        String tasks, int K)    {                        Map map            = new HashMap();                  int curr_time = 0;                  for (char c : tasks.toCharArray()) {                                      if…

Read More

- Amazon, Backtracking, Hash, interview-preparation, Mathematical, Strings

Convert a Mobile Numeric Keypad sequence to equivalent sentence

import*;import java.lang.*;import java.util.*;public class GFG {                static void printSentence(String S)    {                String nums[]            = { “”,    “”,    “ABC”,  “DEF”, “GHI”,                “JKL”, “MNO”, “PQRS”, “TUV”,…

Read More