BlogHide Resteemsgolibrary (37)in nary • 5 years agoDepth of an Nary tree and finding route to a node in itDEPTH OF AN N-ARY TREE AND FINDING ROUTE TO A NODE IN AN N-ARY TREE This article is originally published in Golibrary Co Depth of an N-Ary tree and Finding Route to a node in an N-Ary tree…golibrary (37)in algorithms • 5 years agoFind all triplets with sum zero in a given arrayProblem Statement Given an array of unsorted numbers, find all unique triplets in it that add up to zero. Example 1: Input: [-3, 0, 1, 2, –1, 1, –2] Output: [-3, 1, 2], [-2, 0, 2], [-2, 1…golibrary (37)in squared • 5 years agoSQUARING A SORTED ARRAYProblem Statement Given a sorted array, create a new array containing squares of all the number of the input array in the sorted order. Example 1: Input: [-2, –1, 0, 2, 3] Output: [0, 1, 4…golibrary (37)in steempress • 5 years agoFind longest substring with no repeating charactersProblem Statement Given a string, find the length of the longest substring which has no repeating characters. Example 1: Input: String="aabccbb" Output: 3 Explanation: The longest…golibrary (37)in steempress • 5 years agoFinding maximum number of fruits that can be kept in one basketProblem Statement Given an array of characters where each character represents a fruit tree, you are given two baskets and your goal is to put maximum number of fruits in each basket. The only…golibrary (37)in steempress • 5 years agoLength of smallest subarray with a sum greater than or equal to SProblem Statement Given an array of positive numbers and a positive number ‘S’, find the length of the smallest contiguous subarray whose sum is greater than or equal to ‘S’. Return 0, if no…golibrary (37)in steempress • 5 years agoFinding max sum of subarray with a given length in an arrayProblem Statement Given an array of positive numbers and a positive number ‘k’, find the maximum sum of any contiguous subarray of size ‘k’. Example 1: Input: [2, 1, 5, 1, 3, 2], k=3 Output:…golibrary (37)in steempress • 5 years agoPuppet Basic ConceptsWhat is Puppet? Puppet is an open-source configuration management tool. It is a declarative language for expressing system configuration. Puppet is a client and server for distributing it. It…golibrary (37)in steempress • 5 years agoHistory of Unix and LinuxLet's dive deep into the history of unix and linux, the most revolutionary OSes of all time. Unix History: Unix is a computer operating system developed in 1969 by a group of AT&T…golibrary (37)in steempress • 5 years agoOptimizing hierarchical SQL queriesOverview Every enterprise system has hierarchical data. The reporting engine of these systems generates reports displaying hierarchical tree structures. These kinds of reports are always a…golibrary (37)in steempress • 5 years agoApplication performance analysis using Windows toolkitWhy the CPU utilization is near to 100% on my server machine? Why there is a steady decrease in the available memory? Why the calls are getting dropped? We often get these kinds of questions If we…golibrary (37)in steempress • 5 years agoQuantum money and bitcoinImage This article is originally published in Albaron Ventures. Deemed as one of the biggest potential technological revolutions of recent history, quantum computing also poses security…golibrary (37)in steempress • 5 years agoFinding diameter of a binary treeProblem statement:- Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a…golibrary (37)in steempress • 5 years agoFind cells with odd values in a matrixProblem Statement:- Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices where indices[i] = [ri, ci]. For each pair of [ri, ci] you have to increment…golibrary (37)in steempress • 5 years agoCheck if two given strings are ispmorphicProblem statement:- Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must…golibrary (37)in steempress • 5 years agoSystem Design: Design scalable typeahead componentBelow is the Architecture diagram explaining the design pictorially Explanation Since , our data is massively large, we will keep it distributed on multiple servers named S1, S2…golibrary (37)in steempress • 6 years agoHack remote databases using SQL injectionWhat is SQL Injection SQL injection is a technique of injecting malicious SQL queries in query string of a website vulnerable to SQL injection. Using SQL injection, one can take over a…golibrary (37)in steempress • 6 years agoWhat is Quantum ComputingQuantum Computing Introduction Quantum computing is based on the principles of quantum physics. In physics, a quantum is the minimum amount of any physical entity involved in an interaction -…golibrary (37)in algorithm • 7 years agoPrint all paths between any 2 nodes in a directed GraphGraph A Graph is a specific data structure consisting of a finite number of objects or set of objects. This set of objects are connected by edges or lines between them. The objects are called…golibrary (37)in algorithm • 7 years agoFind an element in an Array of length N which is rotated at point KProblem :- Given a sorted and rotated array (rotated at some point) A[ ], and given an element K, the task is to find the index of the given element K in the array A[ ]. The array has no…