### Divide & Conquer | Algorithms

General design technique: 1. Divide input into part(s) 2. Conquer each part recursively 3. Combine result(s) to solve original problem e.g.- find_peak(a,low,high): mid = (low+high)/2 if a[mid-1] <= a[mid] >= a[mid+1] return mid // this is a peak; if a[mid] < a[mid-1] return find_peak(a,low,mid-1) // a peak must exist in A[low..mid-1] if a[mid] < a[mid+1] return find_peak(a,mid+1,high) // a peak must exist in A[mid+1..high] ...

### big Theta Notations

we ignore constant factors and ignore lower order terms. Notation: f(n)= big Theta[g(n)] How to Read: You should read equals like "is". Is means that everything over here is in over there. Gets the common in both functions. Definition / Explanation: f(n)= big Theta[g(n)] to mean f(n) iscommon/inner setinsome constant times g(n) -- -- for sufficiently large n Assumption: We are going to assume that f(n) is non-negative here. And I just want g(n) to beinner set by f(n). Example: n^2 = Theta(2n^2): up to constant factorsn^2isequal to2n^2for sufficiently large n Range/Corresponds To: cor...

### big Omega Notation

Notation: f(n)= big Omega[g(n)] How to Read: You should read equals like "is". Is means that everything over here is in over there. Definition / Explanation: Ω(g(n))=∑f(n): There exits constants c>0,n0>0 Such that 0<=cg(n)<=f(n) For all n>=n0 f(n)= big Omega[g(n)] to mean f(n) is at least some constant times g(n) -- -- for sufficiently large n Assumption: We are going to assume that f(n) is non-negative here. And I just want g(n) to be bounded above by f(n). Example: root n= big Omega(lg n) : up to constant factors root n is at least log n for sufficiently large n ...

### big O Notation

Notation: We have f(n)=O[g(n)]. How to Read: You should read equals like "is". Is means that everything over here is something over there. Definition / Explanation: This means that there are some suitable constants c and n0, such that f is bounded by cg(n) for all sufficiently large n. So, this is pretty intuitive notion. We have seen it before. f(n)=O[g(n)] means there are constants c and n0, Such that 0<=f(n)<=cg(n) For all n>=n0 Assumption: We are going to assume that f(n) is non-negative here. And I just want f(n) to be bounded above by g(n). Example: We have seen a bunc...

### Stack - Linear Data Structures

The complexity of Stack: Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Stack Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) ...

### Complexity of Common Data Structure

Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Array Θ(1) Θ(n) Θ(n) Θ(n) O(1) O(n) O(n) O(n) O(n) Stack Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) Queue Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) Singly-Linked List Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) Doubly-Linked List Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) Hash Table N/A Θ(1) Θ(1) Θ(1) N/A O(n) O(n) O(n...

### Web Developer Productivity Tools

Fiddler Fiddler is a simple, yet highly reliable software solution that performs HTTP debugging by recording the traffic between the web and your machine. Postman Create and send any HTTP request using the awesome Postman request builder. Write your own test cases to validate response data, response times, and more!. ...

### Graph - Non-Linear Data Structures

Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Binary Search Tree Θ(log(n)) Θ(log(n)) Θ(log(n)) Θ(log(n)) O(n) O(n) O(n) O(n) O(n) Cartesian Tree N/A Θ(log(n)) Θ(log(n)) Θ(log(n)) N/A O(n) O(n) O(n) O(n) B-Tree Θ(log(n)) Θ(log(n)) Θ(log(n)) Θ(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n) Red-Black Tree Θ(log(n)) Θ(log(n)) Θ(log(n)) Θ(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n) Splay Tree N/A Θ(log(...

### Tree - Non-Linear Data Structures

Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Binary Search Tree Θ(log(n)) Θ(log(n)) Θ(log(n)) Θ(log(n)) O(n) O(n) O(n) O(n) O(n) Cartesian Tree N/A Θ(log(n)) Θ(log(n)) Θ(log(n)) N/A O(n) O(n) O(n) O(n) B-Tree Θ(log(n)) Θ(log(n)) Θ(log(n)) Θ(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n) Red-Black Tree Θ(log(n)) Θ(log(n)) Θ(log(n)) Θ(log(n)) O(log(n)) O(log(n)) O(log(n)) O(log(n)) O(n) Splay Tree N/A Θ(log(...

### Queue - Linear Data Structures

The complexity of Queue: Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Queue Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) ...

### Stack - Linear Data Structures

The complexity of Stack List: Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Stack Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) ...

### Linked List - Linear Data Structures

The complexity of Linked List: Time Complexit Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Singly-Linked List Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) Doubly-Linked List Θ(n) Θ(n) Θ(1) Θ(1) O(n) O(n) O(1) O(1) O(n) ...

### Array - Linear Data Structures

Complexity of Array Data Structure Time Complexity Space Complexity Average Worst Worst Data Structure Access Search Insertion Deletion Access Search Insertion Deletion Array Θ(1) Θ(n) Θ(n) Θ(n) O(1) O(n) O(n) O(n) O(n) ...

### Non-Primitive Data Structures

Data Structures,Non-Primitive, Power Booster, Smart Tools For Best Engineer, Developer Must Know Things...

### Windows Productivity Tool For Developer

Notepad++ Free source code editor and Notepad replacement that supports several languages Best Browsers Worlds best browserChrome and Mozila Firefox browser. Remote Desktop Connection Manager RDCMan manages multiple remote desktop connections Console2 Console2 is a great little front-end for your existing shell WinMerge Files Comparision Tools WinDirStat WinDirStat is a disk usage statistics viewer and cleanup tool for various versions of Microsoft Windows. Hyper-V Virtual Machines ...

### Database Productivity Tool

SQL Complete Pretty code with SQL formatting,Much faster work, Coding standards, Support for all SQL Server versions ...

### Productivity Tools For Developer

Power Booster, Smart Tools For Best Engineer ...

### Fish Theory

Small Fish in a Big Pond, or a Big Fish in a Small Pond What kind of fish you want to be Small Fish in a Big Pond vs a Big Fish in a Small Pond? It is the questionwhich every person must have thought about it, at least once.If not then that's good. It shows you are satisfied in life –which ever pond you are in. Small Fish in a Big Pond Big Fish in a Small Pond Competition More Competition Less Competition Challenges More Challenges Less Challenges Learning More Learning Less Learning Risk More Risk, there is always risk to be eaten by big Fish (Shark) http://www.readerpublishing.com/...

### Ashrama : 4 Stages of Life in Hinduism

Ashram system - will represents four periods/stages of human development. Brahmacharya Grihastashram Vanaprastashram Sanyasa Age in years: 0-24 24-48 48-72 72+ Life: Student Household Retired Renounced Purushartha focus: Dharma Dharma,Artha and Kama Dharma andMoksha Dharma andMoksha Represents: Brahma Vishnu Shiva Ishwara Vedas: Samhitas Brahmanas Aranyakas Sanyasa Qualities of Nature / Guna: Develop Sattva Control Rajas Control Tamas Overcome to effect of qualities Food Unlimited 32 core 16 core 8 core ...

### Execute SQL Query Directly Using Entity Framework

Execute SQL query from Entity Framework: //code sample int employeeID = 1000; var sqlQuery = String.Format(@"SELECT TOP 1 EmployeeName FROM Employee WHERE EmployeeID = '{0}' ", employeeID); var result = dbContext.Database.SqlQuery<string>(sqlQuery); ...

### ASP.NET MVC - Difference between Html.Partial vs Html.RenderPartial

Html.Partial Html.RenderPartial Razor syntax: @Html.Partial("ViewName"); @Html.RenderPartial("ViewName"); Returns: Returns MvcHtmlString Returns void Renders: Returns a html encoded string that gets constructed inline with the parent. Directly render/write on output stream. Speed: Slower than Html.RenderPartial Faster than Html.Partial ...

### WCF - Contracts : Data Contracts and Message contracts

WCF Contract: Defines what the service does. Identifies the methods available. Its Interface between client and the server. It’s a simple interface with some attribute. Data Contracts Message Contracts Definition Data contract is a formal agreement between a service and a client that abstractly describes the data to be exchanged Message contracts describe the structure of SOAP messages sent to and from a service and enable you to inspect and control most of the details in the SOAP header and body Describes Describes type of data Describes structure of SOAP. Message Contract is an abstrac...

### WCF - Endpoints

Relationship between Address, Contract,Binding and Behaviorsis called Endpoint. Each endpoint consists of four properties: Address, Contract, Binding and Behaviors Address (A) Defines where the service resides. Indicates where to find the endpoint. Binding (B) Defines how to communicate with the service. Specifies how a client can communicate with the endpoint. Specifies how the two parties will communicate in term of transport and encoding and protocols. Contract (C) Defines what the service does. Identifies the methods available. Its Interface between client and the server.It’s a simpl...