Chatbox

Các bạn vui lòng dùng từ ngữ lịch sự và có văn hóa,sử dụng Tiếng Việt có dấu chuẩn. Chúc các bạn vui vẻ!
02/06/2021 20:06 # 1
buiducduong
Cấp độ: 22 - Kỹ năng: 1

Kinh nghiệm: 7/220 (3%)
Kĩ năng: 0/10 (0%)
Ngày gia nhập: 25/09/2020
Bài gởi: 2317
Được cảm ơn: 0
Data structures and algorithms


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 = 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:

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

😱😱😱😱😱😱😱😱😱😱😱

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

\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.

  • FanpageVNOI
  • VNOI
  • LapTrinhKhongKho

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.




 
Copyright© Đại học Duy Tân 2010 - 2024