-
MY PROJECTS
-
Recent Posts
- SQL.How can you compare two nullable values safely, and how does IS DISTINCT FROM differ from <>?
- SQL.How are NULL values ordered by ORDER BY, how do defaults differ between databases, and how can you control their placement?
- SQL.How does NULL propagate through arithmetic expressions, and how can COALESCE and NULLIF help handle missing values and division by zero?
- SQL.How does NULL affect join conditions, and why can filtering the right-hand table in WHERE remove unmatched rows from a LEFT JOIN?
- SQL.How do GROUP BY and DISTINCT treat NULL values, even though NULL = NULL evaluates to UNKNOWN?
- SQL.How do aggregate functions handle NULL, and what is the difference between COUNT(*), COUNT(column), and COUNT(DISTINCT column)?
- SQL.How does NULL affect IN and NOT IN, and why can NOT EXISTS be a safer choice when a subquery returns nullable values?
- SQL.How do WHERE, HAVING, and CHECK constraints treat conditions that evaluate to UNKNOWN?
- SQL.Why do column = NULL and column <> NULL not work as expected, and when should you use IS NULL and IS NOT NULL?
- SQL.What is SQL’s three-valued logic (TRUE, FALSE, UNKNOWN), and how do AND, OR, and NOT behave with UNKNOWN?
- ChromeDevTools.Watch all failed requests
- SQL.What are domain types (or constraints on data types), and how do they help enforce data correctness?
- SQL.How does SQL handle comparisons between different data types (for example, string vs number), and why is this dangerous?
- SQL.What is the difference between DATE, TIME, TIMESTAMP, and TIMESTAMPTZ, and which one should be used for business events?
- SQL.How do numeric types like INTEGER, BIGINT, DECIMAL, and FLOAT differ in terms of precision and use cases?
- SQL.What problems can arise from implicit type casting in SQL, and how can it affect indexes?
- SQL.How does NULL differ from 0, an empty string, or FALSE in SQL?
- SQL.What is the difference between CHAR, VARCHAR, and TEXT, and when would you choose each?
- SQL.What is MVCC ?
- SQL.What is AutoVacuum Postgres ?
Categories
- Aptana
- Azure
- C#
- DataSnap
- DBExpress
- Delphi
- Delphi и сети
- Delphi. Язык программирования
- ExtJS
- FastReport
- FireDAC
- FireMonkey
- GIT
- ICS
- IDE
- IIS
- Indy
- InnoSetup
- javascript
- jQuery
- JSON
- LiveBindings
- MSHTML
- MySQL
- PHP
- REST
- Ribbons
- SMS
- SQL инструкции
- SVN
- TRichView
- UniGui
- WebBroker
- WinAPI
- Windows
- Алгоритмы
- Без рубрики
- Деревья
- Ищу ответ
- Компонентостроение
- Мои компоненты
- Начальный уровень
- Обработка исключений
- Парсинг
- Потоки(Threads)
- Регулярные выражения
- Тестирование приложений
Author Archives: Stanislav_Panteleev
Java.Collections.Is it possible for HashMap to degenerate into a list even with keys having different hashCode()?
Yes, a HashMap can degenerate into a linked list even if the keys have different hashCode() values, under certain conditions. Let me explain how and why. 🔍 How HashMap organizes entries: Each key’s hashCode() is used to determine its bucket … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.Is it possible for HashMap to degenerate into a list even with keys having different hashCode()?
Java.Collections.What is the estimated time complexity of operations on elements from HashMap? Does HashMap guarantee the specified complexity of element selection?
✅ Estimated Time Complexity of HashMap operations Operation Average Case Worst Case (pre-Java 8) Worst Case (Java 8+) get(key) O(1) O(n) O(log n) (with tree bins) put(key, value) O(1) O(n) O(log n) remove(key) O(1) O(n) O(log n) containsKey() O(1) O(n) … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.What is the estimated time complexity of operations on elements from HashMap? Does HashMap guarantee the specified complexity of element selection?
Java.Collections.What is the initial number of buckets in HashMap?
In Java, the initial number of buckets in a HashMap depends on the constructor used when creating the map. By default: 👉 The initial capacity is 16 buckets. Key details: Initial Capacity: 16 (this means 16 buckets internally). Load Factor: … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.What is the initial number of buckets in HashMap?
Java.Collections.How does HashMap work when trying to store two elements in it by keys with the same hashCode(), but for which equals() == false?
🎯 TL;DR: ✅ HashMap can store multiple keys with the same hashCode() as long as equals() returns false — because it uses both hashCode() and equals() to handle collisions properly.
Posted in Без рубрики
Comments Off on Java.Collections.How does HashMap work when trying to store two elements in it by keys with the same hashCode(), but for which equals() == false?
Java.Collections.According to Knuth and Cormen, there are two main implementations of a hash table: open addressing and chaining. How is HashMap implemented? Why do you think this implementation was chosen? What are the pros and cons of each approach?
🧠 Hash Table Implementations (per Knuth & CLRS) 1. Chaining Each bucket contains a list (or tree) of entries. Collisions are handled by appending to that list. 2. Open Addressing All entries live in the array itself. On collision, we … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.According to Knuth and Cormen, there are two main implementations of a hash table: open addressing and chaining. How is HashMap implemented? Why do you think this implementation was chosen? What are the pros and cons of each approach?
Java.Collections.How is HashMap constructed?
🔧 How is a HashMap constructed? 🔹 At a high level, a HashMap is: A hash table implementation that maps keys to values using a combination of array + linked list + (sometimes) red-black trees.
Posted in Без рубрики
Comments Off on Java.Collections.How is HashMap constructed?
Java.Collections.How does SortedMap “sort” itself, other than the fact that toString() outputs all elements in order?
✅ Yes — SortedMap is an interface in Java. It is part of the Java Collections Framework, and it defines the contract for a map that maintains sorted order of keys.
Posted in Без рубрики
Comments Off on Java.Collections.How does SortedMap “sort” itself, other than the fact that toString() outputs all elements in order?
Java.Collections.LinkedHashMap – what is from LinkedList and what is from HashMap?
🔍 What is LinkedHashMap? LinkedHashMap is a hash table + doubly linked list implementation of the Map interface.It maintains the insertion order (or access order) of entries, unlike regular HashMap.
Posted in Без рубрики
Comments Off on Java.Collections.LinkedHashMap – what is from LinkedList and what is from HashMap?
Java.Collections.What is WeakHashMap?
🧩 What is a WeakHashMap? A WeakHashMap is a hash table-based map where the keys are stored as weak references. If a key is no longer referenced elsewhere in your application, then the entry will be automatically removed by the … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.What is WeakHashMap?
Java.Collections.WeakHashMap uses WeakReferences. Why not create a PhantomHashMap on PhantomReferences?
🔍 Quick Refresher Reference Type get() returns? Enqueued when? Common Use Case WeakReference ✅ the object When object is weakly reachable WeakHashMap, caches PhantomReference ❌ always null After finalization, before GC reclaims Cleanup, monitoring, resource release
Posted in Без рубрики
Comments Off on Java.Collections.WeakHashMap uses WeakReferences. Why not create a PhantomHashMap on PhantomReferences?