Skip to content

Tag Archives: Oracle

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may… Read More
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may… Read More
Write a SortedMerge() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which… Read More
  Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are… Read More
Given a binary tree and a number, return true if the tree has a root-to-leaf path such that adding up all the values along the… Read More
The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two end nodes. The diagram below… Read More
The problem is opposite of this post. We are given a stack data structure with push and pop operations, the task is to implement a… Read More
Write a function which takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed… Read More
Print the elements of an array in the decreasing frequency if 2 numbers have same frequency then print the one which came first.  Examples:   Input:… Read More