Data Structure - Study24x7
Social learning Network

Welcome Back

Get a free Account today !

or
datastructure Cover image
datastructure
Data Structure
  • Followers
  • Latest Feeds
  • Articles
  • Question
  • Course
  • About
  • Review
Interests
GATE/ESE/PSU Java Technologies Databases Big Data & Analytics ...
70 followers study24x7 03 Nov 2020 01:55 PM study24x7 study24x7

๐™’๐™๐™–๐™ฉ ๐™ž๐™จ ๐™ˆ๐™š๐™ข๐™ฉ๐™–๐™—๐™ก๐™š...๏ผŸ โžŠ A memtable is basically a write-back cache of data rows that can be looked up by key i.e. unlike a write-through cache, writes are batched up in the memtable until it is full, when a memtable is full, and it is written to disk as SSTable. Memtable is an in-memory cache with content stored as key/column. Memtable data are sorted by key. Each ColumnFamily has a separate Memtable and retrieve column data from the key. Cassandra writes are first written to the CommitLog. After writing to CommitLog, Cassandra writes the data to memtable. โž‹ A memtable is an interactive touch table that supports co-located group meeting by capturing both digital and physical interaction in its memory. A memtable is basically a write-back cache of data rows that can be looked up by key i.e. unlike a write-through cache, writes are batched up in the memtable until it is full, when a memtable is full, and it is written to disk as SSTable. Memtable is an in-memory cache with content stored as key/column. Memtable data are sorted by key; each ColumnFamily has a separate Memtable and retrieve column data from the key. Cassandra writes are first written to the CommitLog. After writing to CommitLog, Cassandra writes the data to memtable.

๐™’๐™๐™–๐™ฉ ๐™ž๐™จ ๐™ˆ๐™š๐™ข๐™ฉ๐™–๐™—๐™...
study24x7
Write a comment
70 followers study24x7 03 Nov 2020 11:55 AM study24x7 study24x7

Mongodb vs Cassandra

Mongodb vs Cassandra
study24x7
Write a comment
70 followers study24x7 06 Mar 2020 03:14 PM study24x7 study24x7

๐˜ฟ๐™š๐™ฉ๐™š๐™˜๐™ฉ ๐™ก๐™ค๐™ค๐™ฅ ๐™ž๐™ฃ ๐™– ๐™ก๐™ž๐™ฃ๐™ ๐™š๐™™ ๐™ก๐™ž๐™จ๐™ฉ Use HashSet Traverse the list one by one and keep putting the node addresses in a Hash Table. At any point, if NULL is reached then return false and if next of current node points to any of the previously stored nodes in Hash then return true. At the beginning of the List, we put the first node address to HashSet. For the next node first, check address contains in HashSet if it contains then there is loop else no loop detect. import java.util.*; public class LinkedList { static Node head; static class Node { int data; Node next; Node(int d) { data = d; next = null; } } static public void push(int new_data) { Node new_node = new Node(new_data); new_node.next = head; head = new_node; } static boolean detectLoop(Node h) { HashSet<Node> s = new HashSet<Node>(); while (h != null) { if (s.contains(h)) return true; s.add(h); h = h.next; } return false; } public static void main(String[] args) { LinkedList llist = new LinkedList(); llist.push(20); llist.push(4); llist.push(15); llist.push(10); llist.head.next.next.next.next = llist.head; if (detectLoop(head)) System.out.println("Loop found"); else System.out.println("No Loop"); } }

๐˜ฟ๐™š๐™ฉ๐™š๐™˜๐™ฉ ๐™ก๐™ค๐™ค๐™ฅ ๐™ž๐™ฃ ๐...
study24x7
Write a comment
  • Hridendra Srivastava
  • by using slow and fast pointer we also find the loop.
    70 followers study24x7 21 Feb 2020 12:53 PM study24x7 study24x7

    ๐““๐“ช๐“ฝ๐“ช ๐“ข๐“ฝ๐“ป๐“พ๐“ฌ๐“ฝ๐“พ๐“ป๐“ฎ ๐“ช๐“ท๐“ญ ๐“๐“ต๐“ฐ๐“ธ๐“ป๐“ฒ๐“ฝ๐“ฑ๐“ถ๐“ผ - ๐“›๐“ฒ๐“ท๐“ด๐“ฎ๐“ญ ๐“›๐“ฒ๐“ผ๐“ฝ A linked list is a sequence of data structures, which are connected together via links. Linked List is a sequence of links which contains items. Each link contains a connection to another link. The linked list is the second most-used data structure after array. Following are the important terms to understand the concept of Linked List. โžก Link โˆ’ Each link of a linked list can store a data called an element. โžก Next โˆ’ Each link of a linked list contains a link to the next link called Next. โžก LinkedList โˆ’ A Linked List contains the connection link to the first link called First. Linked List Representation A linked list can be visualized as a chain of nodes, where every node points to the next node. As per the below illustration, the following are the important points to be considered. โžก Linked List contains a link element called first. โžก Each link carries a data field(s) and a link field called next. โžก Each link is linked with its next link using its next link. โžก The last link carries a link as null to mark the end of the list.

    ๐““๐“ช๐“ฝ๐“ช ๐“ข๐“ฝ๐“ป๐“พ๐“ฌ๐“ฝ๐“พ๐“ป๐“ฎ...
    study24x7
    Write a comment
    70 followers study24x7 20 Nov 2019 01:31 AM study24x7 study24x7

    Do You Know....?

    Do You Know....?
    study24x7
    Write a comment
    70 followers study24x7 16 Nov 2019 02:56 PM study24x7 study24x7
    study24x7
    Write a comment
    70 followers study24x7 29 Sep 2019 11:54 PM study24x7 study24x7

    Outer Join.

    Outer Join.
    study24x7
    Write a comment
    70 followers study24x7 25 Aug 2019 04:39 AM study24x7 study24x7

    What is Normalization?

    Database normalization is a data design and organization process applied to data structures based on rules that help to build relational databases. In relational database design, the process of organizing data to minimize redundancy is called normalization. Normalization usually involves dividing a database into two or more tables and defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.

    study24x7
    Write a comment
    70 followers study24x7 23 Aug 2019 05:53 PM study24x7 study24x7

    SQL injection categories

    SQL injection categories
    study24x7
    Write a comment
    70 followers study24x7 19 Jun 2019 10:39 AM study24x7 study24x7

    The SQL command to create a table is:

    A

    MAKE TABLE.

    B

    ALTER TABLE.

    C

    DEFINE TABLE.

    D

    CREATE TABLE.

    study24x7
    Write a comment
    70 followers study24x7 07 Jun 2019 02:16 AM study24x7 study24x7

    Binary Tree Data Structure *_* A tree whose elements have at most 2 children is called a binary tree. It is made of nodes, where each node contains a "left" reference, a "right" reference, and a data element. The topmost node in the tree is called the root. Nodes which are not leaves are called internal nodes. Nodes with the same parent are called siblings. Binary Tree is a special data structure used for data storage purposes. It has the benefits of both an ordered array and a linked list as search is as quick as in a sorted array and insertion or deletion operation are as fast as in a linked list. A Binary Tree node contains the following parts. * Data * Pointer to left child * Pointer to the right child

    Binary Tree Data Structure
*_* A tree whose elements ...
    study24x7
    Write a comment
    70 followers study24x7 20 May 2019 01:00 AM study24x7 study24x7

    SQL

    SQL
    study24x7
    Write a comment
    70 followers study24x7 02 May 2019 07:21 PM study24x7 study24x7

    Which of the following products was an early implementation of the relational model developed by E.F. Codd of IBM?

    A

    IDMS

    B

    DB2

    C

    dBase-II

    D

    R:base

    study24x7
    Write a comment
    70 followers study24x7 30 Apr 2019 01:58 AM study24x7 study24x7

    study24x7
    Write a comment
    70 followers study24x7 30 Apr 2019 01:37 AM study24x7 study24x7

    What is Big O notation ....? Calculating the exact runtime of an algorithm is difficult because it depends on the machine, the programming language, and the implementation of the algorithm. Instead of calculating the exact runtime or number of operations, we can estimate the runtime using big O notation, which ignores constant factors. We associate with each algorithm a function f(n), which is the number of operations performed for input size n. We say that f(n) is O(g(n)) if for some positive constants c and n0, f(n) โ‰ค cg(n) for all n โ‰ฅ n0 For example, if an algorithm's runtime is O(n), then the runtime is โ‰ค c * n for all sufficiently large n. We can also use big O notation to describe how much space an algorithm uses. Sometimes space is described in terms of extra space (not including the space used by the input). Example 3n2 + 100n is O(n2). A simple way to find the big O is by looking at the largest exponent. As n becomes large, the 100n becomes insignificant. * Basic operations such as comparison or arithmetic take constant time. * A loop that repeats n times, with a constant number of operations per loop, takes O(n) time. * A nested loop where each loop repeats n times takes O(n2) time. * A loop that repeatedly halves n takes O(logn) time.

    What is Big O notation ....?

Calculating the exact r...
    study24x7
    Write a comment
    70 followers study24x7 30 Apr 2019 01:31 AM study24x7 study24x7

    What are the Time Cases..? *_* Worst Case: This is the scenario where a particular data structure operation takes the maximum time it can take. If an operation's worst-case time is ฦ’(n) then this operation will not take more than ฦ’(n) time where ฦ’(n) represents a function of n. *_* Average Case: This is the scenario depicting the average execution time of an operation of a data structure. If an operation takes ฦ’(n) time in execution, then m operations will take mฦ’(n) time. *_* Best Case: This is the scenario depicting the least possible execution time of an operation of a data structure. If an operation takes ฦ’(n) time in execution, then the actual operation may take time as the random number which would be maximum as ฦ’(n).

    What are the Time Cases..?

*_* Worst Case: This is t...
    study24x7
    Write a comment
    70 followers study24x7 30 Apr 2019 01:24 AM study24x7 study24x7

    Characteristic of a Data Structure *-* Correctness: Data structure implementation should implement its interface correctly. *-* Time Complexity: Running time or the execution time of operations of the data structure must be as small as possible. *-* Space Complexity: Memory usage of a data structure operation should be as little as possible.

    study24x7
    Write a comment
    70 followers study24x7 30 Apr 2019 01:16 AM study24x7 study24x7

    What is the data structure.....? Data + Structure Data: Data is a set of values of subjects with respect to qualitative or quantitative variables. Structure: Structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. In simple terms, we can say Data Structure is a systematic way to organize data in order to use it efficiently. A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.

    What is the data structure.....?
Data + Structure
Dat...
    study24x7
    Write a comment
    About

    The data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is ...
    See More

    Ratings
    5.0
    out of 5
    7 Ratings
    5 study24x7
     
    7.0
    4 study24x7
     
    0.0
    3 study24x7
     
    0.0
    2 study24x7
     
    0.0
    1 study24x7
     
    0.0
    Related Pages

    General Knowledge An..

    1887 followers

    RAU IAS COACHING

    1628 followers

    SSC 2021 Preparation..

    1548 followers

    UPSC Civil Services ..

    1511 followers

    KBC Q And A

    76 followers

    STUDY WITH VIJAY.

    26 followers

    Java Beginner

    8 followers