Posts

Data Structures (insertion sort in data structures)

Image
 Insertion Sort 👉  Insertion sort is the simple sorting algorithm which is commonly used in the daily lives while  ordering a deck of cards.  👉  In this algorithm, we insert each element onto its proper place in  the sorted array.  👉  This is less efficient than the other sort algorithms like quick sort, merge  sort, etc. Technique: 👉  Consider an array A whose elements are to be sorted. Initially, A[0] is the only element on  the sorted set.  👉  In pass 1, A[1] is placed at its proper index in the array. 👉  In pass 2, A[2] is placed at its proper index in the array. Likewise, in pass n-1, A[n-1] is placed at its proper index into the array. 👉  To insert an element A[k] to its proper index, we must compare it with all other elements  i.e. A[k-1], A[k-2], and so on until we find an element A[j] such that, A[j]<=A[k]. 👉  All the elements from A[k-1] to A[j] need to be shifted and A[k] will ...

Data Structures (Bubble Sort in Data Structures)

Image
  Bubble sort  👉   Bubble sort is the simplest sorting algorithm in data structures. 👉     In Bubble sort, Each element of the array is compared with its adjacent element. 👉     The algorithm processes the list in passes. 👉     A list with n elements requires n-1 passes for sorting. 👉     In every pass the highest element is places at the highest Index position in a list. Technique : 👉     In Pass 1, A[0] is compared with A[1], A[1] is compared with A[2], A[2] is compared with A[3] and so on. At the end of pass 1, the largest element of the list is placed at the highest index of the list. 👉     In Pass 2, A[0] is compared with A[1], A[1] is compared with A[2] and so on. At the end of Pass 2 the second largest element of the list is placed at the second highest index of the list. 👉     In pass n-1, A[0] is compared with A[1], A[1] is compared with A[2] and so on. At the end of this pass. The smal...

tableau(Pace chart in tableau)

Image
  pace charts in Tableau: Pace charts are an alternative  bullet graph  design that normalize progress to goal visualizations across KPIs, even if the KPIs have different data formats, scales, and/or seasonal trends.  The underlying data set used to create this pace chart looks like this:   Even though the KPIs are on very different scales, it is easy to compare them to determine which are on pace, slightly behind pace, or behind pace. To affirm this point, here is the same data using a traditional bullet graph:   With this visualization, it is impossible to compare the progress to goal of KPI 3, which is on a much smaller scale than the other KPIs. It is also challenging to determine the progress to goal of KPI 7, because it is on the same scale as KPI 1, which has the largest goal and is extending the x-axis. While you could break this graph up into seven different parts to fix the scaling, there is a better way to normalize the data. How to cre...

Tableau(Control chart in tableau)

Image
  control charts in Tableau: Control chart is a statistical tool used to determine if a manufacturing or business process is in a state of control. Control chart uses standard deviations above and below the mean, which are displayed as bands - with outliers identified using color. Standard deviation is used to show how far a way data is from the mean. In this chart, the measure of standard deviation is used to identify outliers in the data. (Data points that differ significantly from other observations). A control chart consists of: Points representing measurements in samples taken from a process at different times. The mean of all measurements in the sample. A center line is drawn at the mean. The control limits – UCL – the upper control limit and LCL – the lower control limit. Signals – Outliers (any point outside the control limits) Example of a control chart How to create a control chart in Tableau Create a simple timeline by dragging WEEK(Order Date) to the columns and SUM...