- vừa được xem lúc

Data structures and algorithms

0 0 8

Người đăng: Lê Công Tuấn Anh

Theo Viblo Asia

1. introduce myself.

Hello, my name is Chao ?, oh wait, it's me again. I am a twenty-one-year-old. I am currently a third-year student at Hanoi University of Science and Technology, specializing in information systems. Like my fellow majors, I enjoy playing video games, and my favorite is Counter-Strike ?. Maybe I'm just old-fashioned ?. In addition, I enjoy telling jokes, reading books, and listening to music... Making people laugh is one of my favorite things to do. ??

** My life motto: The measure of life is not its duration, but its donation. **

2. reasons I start a blog.

I've found Viblo to be a good platform for sharing knowledge with the developer community and learning from experienced computer programmers in the IT community.

Many information technology students struggle with the subject data structure and algorithms. This is a difficult subject for many people, and it is sometimes referred to as a "nightmare" ?? (including me). I hope that by producing humorous articles, I can help to your understanding of programming in the c/c++ and python programming languages.

I share some applied math expertise in my blogging: integrations, matrix...

The only person you should try to be better than is the person you were yesterday ^^ ????

 python: print(hello world) c: #include<stdio.h> int main(){ printf("hello world"); return 0; } c++: #include<iostream> using namespace std; int main(){ cout<<"hello wolrd; return 0; }

3. Introduction to Data structures and algorithms.

What are data structures and algorithms? What is the point of learning data structures and algorithms? ?? These are two questions that many students, including experienced engineers, in the information technology business frequently ask ??.

**If you look up wikipedia, you'll see: **

  • "In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data."
  • "In mathematics and computer science, an algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always unambiguous and are used as specifications for performing calculations, data processing, automated reasoning, and other tasks."

It's difficult to comprehend. ???. Don't worry, I'll offer you two solutions to one problem to help you comprehend it better.

Problem: Determine whether or not a positive integer n >= 2 is prime.

Block formula:

For:n=1026For: n = 10^{26}

sol1: for(i = 2; i <= n - 1' i++) if(n % i == 0) count++ if(count == 0) cout<<true; else cout<<false; sol2: for(i = 2; i <= sqrt(n); i++) if(n % i == 0) count++; if(count == 0) cout<<true; else cout<<false; 

Sol1: It's clear that the first answer necessitates n - 2 Mod computations. Assume that a computer can perform hundreds of trillion calculations per second, which means that checking the number n takes around Block formula:

10261014.60.60.24.365=31700 years \frac{10^{26}}{10^{14}.60.60.24.365} = 31700 \space years

???????????

Sol2: We simply need to run 2 to Inline formula: n\sqrt{\smash[b]{n}} tests with this solution. So, in order to verify the number, we take around Block formula:

10261014 = 0,1s \frac{\sqrt{\smash[b]{10^{26}}}}{10^{14}}\ =\ 0, 1 s

Amazing gut-chop ?????

Have you understood the usefulness of the algorithm yet? The previous example demonstrates why we need to master algorithms: selecting a good algorithm saves us a significant amount of time and money. ???

In fact, it is a truth that the Coding Interview is always an essential element of the interview and plays a significant role in many significant firms around the world (GOOGLE, FACEBOOK, APPLE...). It not only aids in determining a candidate's thinking capacity, but it also assists the organization in quickly weeding out the best prospects. They need to design huge, performant, and scalable products at major companies like that. That's where folks who can think algorithmically and have a rudimentary understanding of algorithm design come in handy.

Do you want to work at Google as a software engineer?????

For your convenience, I've included some links below.

In the following post, I'll go over data structures that are widely used in tests, interviews, or simply to help you comprehend your coding work better. I hope you find what I've shared useful. ???

??Goodbye, and I hope to see you again.

Bình luận

Bài viết tương tự

- vừa được xem lúc

Hành trình AI của một sinh viên tồi

Mình ngồi gõ những dòng này vào lúc 2h sáng (chính xác là 2h 2 phút), quả là một đêm khó ngủ. Có lẽ vì lúc chiều đã uống cốc nâu đá mà giờ mắt mình tỉnh như sáo, cũng có thể là vì những trăn trở về lý thuyết chồng chất ánh xạ mình đọc ban sáng khiến không tài nào chợp mắt được hoặc cũng có thể do mì

0 0 131

- vừa được xem lúc

[Deep Learning] Key Information Extraction from document using Graph Convolution Network - Bài toán trích rút thông tin từ hóa đơn với Graph Convolution Network

Các nội dung sẽ được đề cập trong bài blog lần này. . Tổng quan về GNN, GCN. Bài toán Key Information Extraction, trích rút thông tin trong văn bản từ ảnh.

0 0 204

- vừa được xem lúc

Tìm hiểu về YOLO trong bài toán real-time object detection

1.Yolo là gì. . Họ các mô hình RCNN ( Region-Based Convolutional Neural Networks) để giải quyết các bài toán về định vị và nhận diện vật thể.

0 0 272

- vừa được xem lúc

Encoding categorical features in Machine learning

Khi tiếp cận với một bài toán machine learning, khả năng cao là chúng ta sẽ phải đối mặt với dữ liệu dạng phân loại (categorical data). Khác với các dữ liệu dạng số, máy tính sẽ không thể hiểu và làm việc trực tiếp với categorical variable.

0 0 244

- vừa được xem lúc

TF Lite with Android Mobile

Như các bạn đã biết việc đưa ứng dụng đến với người sử dụng thực tế là một thành công lớn trong Machine Learning.Việc làm AI nó không chỉ dừng lại ở mức nghiên cứu, tìm ra giải pháp, chứng minh một giải pháp mới,... mà quan trọng là đưa được những nghiên cứu đó vào ứng dụng thực tế, được sử dụng để

0 0 55

- vừa được xem lúc

Xây dựng hệ thống Real-time Multi-person Tracking với YOLOv3 và DeepSORT

Trong bài này chúng ta sẽ xây dựng một hệ thống sử dụng YOLOv3 kết hợp với DeepSORT để tracking được các đối tượng trên camera, YOLO là một thuật toán deep learning ra đời vào tháng 5 năm 2016 và nó nhanh chóng trở nên phổ biến vì nó quá nhanh so với thuật toán deep learning trước đó, sử dụng YOLO t

0 0 303