The document discusses two sorting algorithms: Quicksort and Mergesort. Quicksort works by picking a pivot element and partitioning the array around that pivot, recursively sorting the subarrays. It has average time complexity of O(n log n) but worst case of O(n^2). Mergesort works by dividing the array into halves, recursively sorting the halves, and then merging the sorted halves together. It has time complexity of O(n log n) in all cases. The document also includes Java code for implementing MergeSort and discusses how it works.
Mergesort is a divide and conquer algorithm that does exactly that. It splits the list in half
Mergesorts the two halves Then merges the two sorted halves together Mergesort can be implemented recursively
A Survey of Adaptive QuickSort AlgorithmsCSCJournals
In this paper, a survey of adaptive quicksort algorithms is presented. Adaptive quicksort algorithms improve on the worst case behavior of quicksort when the list of elements is sorted or nearly sorted. These algorithms take into consideration the already existing order in the input list to be sorted. A detailed description of each algorithm is provided. The paper provides an empirical study of these algorithms by comparing each algorithm in terms of the number of comparisons performed and the running times when used for sorting arrays of integers that are already sorted, sorted in reverse order, and generated randomly.
Mergesort is a divide and conquer algorithm that does exactly that. It splits the list in half
Mergesorts the two halves Then merges the two sorted halves together Mergesort can be implemented recursively
A Survey of Adaptive QuickSort AlgorithmsCSCJournals
In this paper, a survey of adaptive quicksort algorithms is presented. Adaptive quicksort algorithms improve on the worst case behavior of quicksort when the list of elements is sorted or nearly sorted. These algorithms take into consideration the already existing order in the input list to be sorted. A detailed description of each algorithm is provided. The paper provides an empirical study of these algorithms by comparing each algorithm in terms of the number of comparisons performed and the running times when used for sorting arrays of integers that are already sorted, sorted in reverse order, and generated randomly.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
29. MergeSort.java
public class MergeSort<T extends Comparable<T>> extends AbstractSort<T> {
private T[] temp;
@Override
public void sort(T[] array, int beginIndex, int endIndex) {
if (beginIndex + 1 >= endIndex) return;
int middleIndex = Utils.getMiddleIndex(beginIndex, endIndex);
// sort left partition
sort(array, beginIndex, middleIndex);
// sort Right partition
sort(array, middleIndex, endIndex);
// merge partitions
merge(array, beginIndex, middleIndex, endIndex);
}
T[] temp
Utils.getMiddleIndex()
30. private void copy(T[] array, int beginIndex, int endIndex) {
int N = array.length;
if (temp == null || temp.length < N)
temp = Arrays.copyOf(array, N);
else {
N = endIndex - beginIndex;
System.arraycopy(array, beginIndex, temp, beginIndex, N);
}
assignments += N;
}
Arrays.copyOf() System.arraycopy()
temp
temp
31. /**
* @param beginIndex the beginning index of the 1st half (inclusive).
* @param middleIndex the ending index of the 1st half (exclusive).
* @param endIndex the ending index of the 2nd half (exclusive).
*/
private void merge(T[] array, int beginIndex, int middleIndex, int endIndex) {
int fst = beginIndex, snd = middleIndex;
copy(array, beginIndex, endIndex);
for (int k = beginIndex; k < endIndex; k++) {
if (fst >= middleIndex) // no key left in the 1st half
assign(array, k, temp[snd++]);
else if (snd >= endIndex) // no key left in the 2nd half
assign(array, k, temp[fst++]);
else if (compareTo(temp, fst, snd) < 0) // 1st key < 2nd key
assign(array, k, temp[fst++]);
else
assign(array, k, temp[snd++]);
}
}
33. Quick Sort
3
3 2 7 4 6 8 1 5
Pick a pivot and swap between left and right partitions.
34. Quick Sort
3
3 2 7 4 6 8 1 5
Pick a pivot and swap between left and right partitions.
35. Quick Sort
3
3 2 7 4 6 8 1 5
Pick a pivot and swap between left and right partitions.
36. Quick Sort
3
3 2 7 4 6 8 1 5
Pick a pivot and swap between left and right partitions.
37. Quick Sort
3
3 2 7 4 6 8 1 51 7
Pick a pivot and swap between left and right partitions.
38. Quick Sort
3
3 2 7 4 6 8 1 51 7
Pick a pivot and swap between left and right partitions.
39. Quick Sort
3
3 2 7 4 6 8 1 51 7
Pick a pivot and swap between left and right partitions.
40. Quick Sort
3
3 2 7 4 6 8 1 51 71 3
Pick a pivot and swap between left and right partitions.
41. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
Pick a pivot and swap between left and right partitions.
42. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
Pick a pivot and swap between left and right partitions.
43. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
Pick a pivot and swap between left and right partitions.
44. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
Pick a pivot and swap between left and right partitions.
45. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
Pick a pivot and swap between left and right partitions.
46. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54
Pick a pivot and swap between left and right partitions.
47. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54
Pick a pivot and swap between left and right partitions.
48. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54
Pick a pivot and swap between left and right partitions.
49. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54 5 8
Pick a pivot and swap between left and right partitions.
50. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54 5 8
Pick a pivot and swap between left and right partitions.
51. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54 5 8
Pick a pivot and swap between left and right partitions.
52. Quick Sort
3
3 2 7 4 6 8 1 51 71
1 2 3 6 8 7 5
3
4
1 2 3 6 8 7 54 5 85 6
Pick a pivot and swap between left and right partitions.
53. QuickSort.java
@Override
public void sort(T[] array, int beginIndex, int endIndex) {
// at least one key in the range
if (beginIndex >= endIndex) return;
int pivotIndex = partition(array, beginIndex, endIndex);
// sort left partition
sort(array, beginIndex, pivotIndex);
// sort right partition
sort(array, pivotIndex + 1, endIndex);
}
54. protected int partition(T[] array, int beginIndex, int endIndex) {
int fst = beginIndex, snd = endIndex;
while (true) {
// Find where endIndex > fst > pivot
while (++fst < endIndex && compareTo(array, beginIndex, fst) >= 0);
// Find where beginIndex < snd < pivot
while (--snd > beginIndex && compareTo(array, beginIndex, snd) <= 0);
// pointers crossed
if (fst >= snd) break;
// exchange
swap(array, fst, snd);
}
// set pivot
swap(array, beginIndex, snd);
return snd;
}