структуры-данных

What data structures do standard python containers use?

Where can I find out what data structures are represented by containers: string, list, tuple, set, dict or what asymptotics d ... is working with a large amount of data and knowing which operations are expensive and which are not is quite useful to know.

Optimal database architecture for an online store

A hackneyed question, but still. There is an online store of computer equipment. A well-known problem is the properties and p ... perience. P.S. Please do not write about NOSQL in advance. I can't believe that all the small online shops are on mongo, etc.

Help me fix the C++code

The Drunkard Game In the drunkard game, a deck of cards is distributed equally to two players. Next, they reveal one top card ... if(d.empty()){ cout<<"second "<<n; } else cout<<"first "<<n; return 0; }

List based on C++static structure

I implemented a list based on a static structure, and line 5 and 17 disappear somewhere during the output. Please tell me wha ... List[i].spot << ':' << ' ' << List[i].name << endl; }; cout << ' ' << endl; }

Binary tree and red black tree

Someone can explain to me what is the difference between a red-black tree and a binary tree, I see the difference only in the ... the tree when it becomes unbalanced, is it not possible to do the same in a binary tree without marking, I can also rebuild.

Comparing objects in python

There are 2 objects. The element-by-element comparison provides equality (i.e., comparing each element with each, x.min_x wit ... y.max_x # True a = x.min_x == y.min_x # True a = x.min_y == y.min_y # True a = x == y # False How to solve the problem?

Optimization of operations for a binary indexed tree (Fenwick tree)

I am doing optimization in one project that is very out of line with the performance requirements. Here, Fenwick trees are wi ... any imperative language. If my reasoning about complexity is wrong, then I would like to know what exactly I am wrong about.

Implementing a binary tree (C#) without using built-in classes and collections

The method of adding a new node does not work. class BinaryTree { class BinaryNode //узел дерева { ... for the right and left subtree). current.right = new BinaryNode(value); current = current.right; What could be wrong here?

Non-recursive traversal of a binary tree without a stack

You need to build a non-recursive binary tree traversal algorithm that has the following properties: A tree of n nodes is t ... on the topic is the Morris bypass, but this algorithm temporarily converts the tree is a "stitched" tree, so it doesn't fit.

What can a Tree of Segments do that a Fenwick Tree can't?

I like the Fenwick Tree for its simplicity of implementation,but I'm afraid that there are tasks that it can't handle, unlike the Segment Tree.Question:What can a Tree of Segments do that a Fenwick Tree can't?

Traversing 2-3 trees.2-3 a tree as a data structure for storing sets

There is such an implementation of 2-3 trees : class Tree { private: Node * root; char name; } class Node { int ... it is the same) . Only now there is a problem with traversing the tree, please help with the description of the algorithm .

Reading and Writing an Object Array List to a file

How to implement writing an object Array List to a file: txt or xml. Please explain this with specific examples. I'm doing a ... his instance. And whether the program will then correctly serialize my list with User objects, and not the empty list itself.

A hashtable in C#. What is it for?

I'm studying theory, tell me what is the practical application of Hashtable.

Circular singly linked list C#

It was necessary to implement a ring list. Made through extension methods. But there is one caveat. How to implement the retu ... sOrLast<T>(this LinkedListNode<T> current) { return current.Previous ?? current.List.Last; } }